lib/Tools/options
changeset 50531 f841ac0cb757
parent 48693 ceeea46bdeba
child 52055 10bc73197a57
--- a/lib/Tools/options	Fri Dec 14 16:33:22 2012 +0100
+++ b/lib/Tools/options	Fri Dec 14 16:45:41 2012 +0100
@@ -16,9 +16,10 @@
   echo
   echo "  Options are:"
   echo "    -b           include \$ISABELLE_BUILD_OPTIONS"
-  echo "    -x FILE      export to FILE in YXML format"
+  echo "    -l           list options"
+  echo "    -x FILE      export options to FILE in YXML format"
   echo
-  echo "  Print Isabelle system options, augmented by MORE_OPTIONS given as"
+  echo "  Report Isabelle system options, augmented by MORE_OPTIONS given as"
   echo "  arguments NAME=VAL or NAME."
   echo
   exit 1
@@ -34,14 +35,18 @@
 ## process command line
 
 eval "declare -a BUILD_OPTIONS=()"
+LIST_OPTIONS="false"
 EXPORT_FILE=""
 
-while getopts "bx:" OPT
+while getopts "blx:" OPT
 do
   case "$OPT" in
     b)
       BUILD_OPTIONS=($ISABELLE_BUILD_OPTIONS)
       ;;
+    l)
+      LIST_OPTIONS="true"
+      ;;
     x)
       EXPORT_FILE="$OPTARG"
       ;;
@@ -53,6 +58,8 @@
 
 shift $(($OPTIND - 1))
 
+[ "$LIST_OPTIONS" = "false" -a -z "$EXPORT_FILE" ] && usage
+
 
 ## main