more options: build is part of default setup;
authorwenzelm
Sun, 28 Mar 2021 11:59:30 +0200
changeset 73504 c259c7a42ac3
parent 73503 eda1d95ef538
child 73505 a35b2ee3148f
more options: build is part of default setup;
Admin/setup
README_REPOSITORY
--- a/Admin/setup	Sun Mar 28 11:45:00 2021 +0200
+++ b/Admin/setup	Sun Mar 28 11:59:30 2021 +0200
@@ -25,6 +25,8 @@
   echo "    -U URL       Isabelle repository server (default: \"$ISABELLE_REPOS\")"
   echo "    -V PATH      version from explicit file or directory (file \"ISABELLE_VERSION\")"
   echo "    -c           check clean working directory"
+  echo "    -f           fresh build of Isabelle/Scala/jEdit"
+  echo "    -n           no build of Isabelle/Scala/jEdit"
   echo "    -r REV       version according to Mercurial notation"
   echo "    -u           version is remote tip"
   echo
@@ -45,6 +47,8 @@
 
 #options
 
+BUILD_OPTIONS="-b"
+
 CLEAN_FORCE=""
 CLEAN_CHECK=""
 
@@ -53,7 +57,7 @@
 VERSION_PATH=""
 VERSION_REV=""
 
-while getopts "CRU:V:cr:u" OPT
+while getopts "CRU:V:cfnr:u" OPT
 do
   case "$OPT" in
     C)
@@ -77,6 +81,12 @@
     c)
       CLEAN_CHECK="--check"
       ;;
+    f)
+      BUILD_OPTIONS="-b -f"
+      ;;
+    n)
+      BUILD_OPTIONS=""
+      ;;
     r)
       VERSION="true"
       VERSION_RELEASE=""
@@ -106,8 +116,11 @@
 ## main
 
 if [ -z "$VERSION" ]; then
-  "$ISABELLE_HOME/bin/isabelle" components -I && \
-  "$ISABELLE_HOME/bin/isabelle" components -a
+  "$ISABELLE_HOME/bin/isabelle" components -I || exit "?$"
+  "$ISABELLE_HOME/bin/isabelle" components -a || exit "?$"
+  if [ -n "$BUILD_OPTIONS" ]; then
+    "$ISABELLE_HOME/bin/isabelle" jedit $BUILD_OPTIONS
+  fi
 elif [ ! -d "$ISABELLE_HOME/.hg" ]; then
   fail "Not a repository clone: cannot specify version"
 else
@@ -135,12 +148,15 @@
   "$ISABELLE_HOME/bin/isabelle" components -I || exit "$?"
 
   #Atomic exec: avoid inplace update of running script!
-  export CLEAN REV ISABELLE_REPOS
+  export CLEAN REV ISABELLE_REPOS BUILD_OPTIONS
   exec bash -c '
     set -e
     "${HG:-hg}" -R "$ISABELLE_HOME" pull -r "$REV" "$ISABELLE_REPOS"
     "${HG:-hg}" -R "$ISABELLE_HOME" update -r "$REV" $CLEAN_FORCE $CLEAN_CHECK
     "$ISABELLE_HOME/bin/isabelle" components -a
+    if [ -n "$BUILD_OPTIONS" ]; then
+      "$ISABELLE_HOME/bin/isabelle" jedit $BUILD_OPTIONS
+    fi
     "${HG:-hg}" -R "$ISABELLE_HOME" log -r "$REV"
     if [ ! -f "$ISABELLE_HOME/Admin/setup" ]; then
       echo >&2 "### The Admin/setup script has disappeared in this version"
--- a/README_REPOSITORY	Sun Mar 28 11:45:00 2021 +0200
+++ b/README_REPOSITORY	Sun Mar 28 11:59:30 2021 +0200
@@ -17,12 +17,6 @@
     hg clone https://isabelle.in.tum.de/repos/isabelle
     isabelle/Admin/setup
 
-    #optional: start Prover IDE and let it build session image
-    isabelle/bin/isabelle jedit -l HOL
-
-    #optional: build session image manually
-    isabelle/bin/isabelle build -b HOL
-
 3. Update repository to particular versions (bash shell commands):
 
     #remote tip version
@@ -34,8 +28,15 @@
     #current official release
     isabelle/Admin/setup -R
 
+4. Run application:
 
-4. Build documentation (bash shell commands):
+    #start Prover IDE and let it build session image
+    isabelle/bin/isabelle jedit -l HOL
+
+    #alternative: build session image manually
+    isabelle/bin/isabelle build -b HOL
+
+5. Build documentation (bash shell commands):
 
     isabelle/bin/isabelle build_doc -a