OSDN Git Service

2000-10-31 Ben Elliston <bje@redhat.com>
authorbje <bje>
Tue, 31 Oct 2000 23:50:09 +0000 (23:50 +0000)
committerbje <bje>
Tue, 31 Oct 2000 23:50:09 +0000 (23:50 +0000)
* gas-test.scm (cgen-build.sh): Allow the generated script to run
with no command line arguments if the gas build directory can be
determined.

cgen/ChangeLog
cgen/gas-test.scm

index 13e031c..c69883b 100644 (file)
@@ -1,3 +1,9 @@
+2000-10-31  Ben Elliston  <bje@redhat.com>
+
+       * gas-test.scm (cgen-build.sh): Allow the generated script to run
+       with no command line arguments if the gas build directory can be
+       determined.
+
 2000-10-26  Doug Evans  <dje@casey.transmeta.com>
 
        * insn.scm (-parse-insn-format-symbol): Fix spelling error,
index 31101b3..e848c46 100644 (file)
 #
 # Syntax: build.sh /path/to/build/gas
 
-BUILD=$1
+if [ $# = 0 ] ; then
+  if [ ! -x ../gas/as-new ] ; then
+    echo \"Usage: $0 [/path/to/gas/build]\"
+  else
+    BUILD=`pwd`/../gas
+  fi
+else
+  BUILD=$1
+fi
 
-if [ ! -f $BUILD/as-new ] ; then
-    echo \"$BUILD is not a GAS build directory.\"
-    exit 1
+if [ ! -x $BUILD/as-new ] ; then
+  echo \"$BUILD is not a gas build directory\"
+  exit 1
 fi
 
 # Put results here, so we preserve the existing set for comparison.