summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-07-01 16:10:22 +0000
committerlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-07-01 16:10:22 +0000
commit95a94c22b28b3e6bb1012d2f7668dfd4bef72cd2 (patch)
treead5462e3c6fed893c0d179408a2b0fc37d598331 /bin
parentbabbb92a343d6f5b79b31dd4a496b5708df072f5 (diff)
downloadATCD-95a94c22b28b3e6bb1012d2f7668dfd4bef72cd2.tar.gz
ChangeLogTag:Thu Jul 01 10:53:33 1999 David L. Levine <levine@cs.wustl.edu>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ace_ld21
1 files changed, 17 insertions, 4 deletions
diff --git a/bin/ace_ld b/bin/ace_ld
index f5fd66431e9..2879512b225 100755
--- a/bin/ace_ld
+++ b/bin/ace_ld
@@ -10,19 +10,28 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# full path to perl, as long as it is in the user's PATH.
# Taken from perlrun man page.
-$usage = "usage: $0 [-? | [[-c <compile>] [-m <munch>] [-n <nm>]] [-f]]]\n";
+$usage =
+ "usage: $0 [-? | [[-C <compile> --] [-m <munch>] [-n <nm>]] [-f]]] " .
+ "<ld command>\n";
+
+#### To avoid quoting problems on the command line, all arguments
+#### between -C and -- are combined into the single compile command.
+$compile_option = 0;
####
#### process command line args
####
while ( $#ARGV >= 0 && $ARGV[0] =~ /^-/ ) {
- if ( $ARGV[0] eq '-c' ) {
+ if ( $ARGV[0] eq '-C' ) {
+ $compile_option = 1;
if ( $ARGV[1] !~ /^[-].+$/ ) {
$compile = $ARGV[1]; shift;
} else {
print STDERR "$0: must provide argument for -c option\n";
die $usage;
}
+ } elsif ( $ARGV[0] eq '--' ) {
+ $compile_option = 0;
} elsif ( $ARGV[0] eq '-m' ) {
if ( $ARGV[1] !~ /^[-].+$/ ) {
$munch = $ARGV[1]; shift;
@@ -41,8 +50,12 @@ while ( $#ARGV >= 0 && $ARGV[0] =~ /^-/ ) {
print "$usage";
exit;
} else {
- warn "$0: unknown option $ARGV[0]\n";
- die $usage;
+ if ($compile_option) {
+ $compile .= " $ARGV[0]";
+ } else {
+ warn "$0: unknown option $ARGV[0]\n";
+ die $usage;
+ }
}
shift;
}