clarified build -n (no build);
authorwenzelm
Tue, 24 Jul 2012 12:28:20 +0200
changeset 48469 826a771cff33
parent 48468 7f2998b95249
child 48470 7483aa690b4f
clarified build -n (no build);
lib/Tools/build
src/Pure/System/build.scala
--- a/lib/Tools/build	Tue Jul 24 12:20:01 2012 +0200
+++ b/lib/Tools/build	Tue Jul 24 12:28:20 2012 +0200
@@ -19,7 +19,7 @@
   echo "    -b           build target images"
   echo "    -d DIR       additional session directory with ROOT file"
   echo "    -j INT       maximum number of jobs (default 1)"
-  echo "    -l           list sessions only"
+  echo "    -n           no build -- test dependencies only"
   echo "    -o OPTION    override session configuration OPTION (via NAME=VAL or NAME)"
   echo "    -s           system build mode: produce output in ISABELLE_HOME"
   echo "    -t           inner session timing"
@@ -53,7 +53,7 @@
 ALL_SESSIONS=false
 BUILD_IMAGES=false
 MAX_JOBS=1
-LIST_ONLY=false
+NO_BUILD=false
 SYSTEM_MODE=false
 TIMING=false
 VERBOSE=false
@@ -61,7 +61,7 @@
 declare -a MORE_DIRS=()
 eval "declare -a BUILD_OPTIONS=($ISABELLE_BUILD_OPTIONS)"
 
-while getopts "abd:j:lo:stv" OPT
+while getopts "abd:j:no:stv" OPT
 do
   case "$OPT" in
     a)
@@ -77,8 +77,8 @@
       check_number "$OPTARG"
       MAX_JOBS="$OPTARG"
       ;;
-    l)
-      LIST_ONLY="true"
+    n)
+      NO_BUILD="true"
       ;;
     o)
       BUILD_OPTIONS["${#BUILD_OPTIONS[@]}"]="$OPTARG"
@@ -106,5 +106,5 @@
 [ -e "$ISABELLE_HOME/Admin/build" ] && { "$ISABELLE_HOME/Admin/build" jars || exit $?; }
 
 exec "$ISABELLE_TOOL" java isabelle.Build \
-  "$ALL_SESSIONS" "$BUILD_IMAGES" "$MAX_JOBS" "$LIST_ONLY" "$SYSTEM_MODE" "$TIMING" \
+  "$ALL_SESSIONS" "$BUILD_IMAGES" "$MAX_JOBS" "$NO_BUILD" "$SYSTEM_MODE" "$TIMING" \
   "$VERBOSE" "${MORE_DIRS[@]}" $'\n' "${BUILD_OPTIONS[@]}" $'\n' "$@"
--- a/src/Pure/System/build.scala	Tue Jul 24 12:20:01 2012 +0200
+++ b/src/Pure/System/build.scala	Tue Jul 24 12:28:20 2012 +0200
@@ -403,7 +403,7 @@
   private def sleep(): Unit = Thread.sleep(500)
 
   def build(all_sessions: Boolean, build_images: Boolean, max_jobs: Int,
-    list_only: Boolean, system_mode: Boolean, timing: Boolean, verbose: Boolean,
+    no_build: Boolean, system_mode: Boolean, timing: Boolean, verbose: Boolean,
     more_dirs: List[Path], more_options: List[String], sessions: List[String]): Int =
   {
     val options = (Options.init() /: more_options)(_.define_simple(_))
@@ -451,7 +451,7 @@
       else if (running.size < (max_jobs max 1)) {
         pending.dequeue(running.isDefinedAt(_)) match {
           case Some((name, info)) =>
-            if (list_only) {
+            if (no_build && verbose) {
               echo(name + " in " + info.dir)
               loop(pending - name, running, results + (name -> 0))
             }
@@ -488,12 +488,12 @@
           Properties.Value.Boolean(all_sessions) ::
           Properties.Value.Boolean(build_images) ::
           Properties.Value.Int(max_jobs) ::
-          Properties.Value.Boolean(list_only) ::
+          Properties.Value.Boolean(no_build) ::
           Properties.Value.Boolean(system_mode) ::
           Properties.Value.Boolean(timing) ::
           Properties.Value.Boolean(verbose) ::
           Command_Line.Chunks(more_dirs, options, sessions) =>
-            build(all_sessions, build_images, max_jobs, list_only, system_mode, timing,
+            build(all_sessions, build_images, max_jobs, no_build, system_mode, timing,
               verbose, more_dirs.map(Path.explode), options, sessions)
         case _ => error("Bad arguments:\n" + cat_lines(args))
       }