OSDN Git Service

add usage info
authordevans <devans>
Sat, 23 Jan 2010 19:57:20 +0000 (19:57 +0000)
committerdevans <devans>
Sat, 23 Jan 2010 19:57:20 +0000 (19:57 +0000)
cgen/ChangeLog
cgen/gen-all

index 2d768d2..5028161 100644 (file)
@@ -1,7 +1,7 @@
 2010-01-23  Doug Evans  <dje@sebabeach.org>
 
        * gen-all: Move build-configuration related parameters to an
-       external file.
+       external file.  Add usage info.
 
        * doc/rtl.texi (Expressions): Add more docs on conversion functions.
 
index 86dee13..f02051d 100644 (file)
@@ -31,6 +31,31 @@ fi
 
 source ./gen-all.rc
 
+usage() {
+    echo "Usage:"
+    echo "  gen-all help"
+    echo "  gen-all [options] [todos] [apps]"
+    echo "  gen-all all"
+    echo ""
+    echo "Options:"
+    echo "cpus=\"space-separated-list-of-cpus\""
+    echo ""
+    echo "Things-to-do:"
+    echo "config   Configure the tree"
+    echo "build    Build the tree"
+    echo "diffs    Generate diffs from what's checked in"
+    echo ""
+    echo "Applications:"
+    echo "binutils, gcc, newlib, sim, sid, intrinsics"
+    echo ""
+    echo "Notes:"
+    echo "\"all\" can be specified which means \"all of the above\""
+    echo "Options, todos, and apps may be specified in any order."
+    echo ""
+    echo "Example:"
+    echo "sh gen-all build binutils diffs cpus=m32r"
+}
+
 # Parameters to configure.
 MPC_CONFIG="--with-mpc=${MPC_DIR}"
 
@@ -62,6 +87,7 @@ sid_cpus="${all_sid_cpus}"
 for a in "$@"
 do
     case $a in
+    help) usage ; trap "" 0 ; exit 0 ;;
     cpus=*) cgen_cpus=${a/cpus=} sid_cpus=${cgen_cpus} ;;
     config) do_config=yes ;;
     build) do_build=yes ;;