clarified "isabelle options" command line, to make it more close to "isabelle components";
authorwenzelm
Fri, 14 Dec 2012 16:45:41 +0100
changeset 50531 f841ac0cb757
parent 50530 6266e44b3396
child 50532 345b25cf2e4f
clarified "isabelle options" command line, to make it more close to "isabelle components";
lib/Tools/options
src/Doc/System/Sessions.thy
--- 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
 
--- a/src/Doc/System/Sessions.thy	Fri Dec 14 16:33:22 2012 +0100
+++ b/src/Doc/System/Sessions.thy	Fri Dec 14 16:45:41 2012 +0100
@@ -150,9 +150,10 @@
 
   Options are:
     -b           include $ISABELLE_BUILD_OPTIONS
+    -l           list options
     -x FILE      export to FILE in YXML format
 
-  Print Isabelle system options, augmented by MORE_OPTIONS given as
+  Report Isabelle system options, augmented by MORE_OPTIONS given as
   arguments NAME=VAL or NAME.
 \end{ttbox}