diff --git a/Admin/lib/Tools/build_setup b/Admin/lib/Tools/build_setup --- a/Admin/lib/Tools/build_setup +++ b/Admin/lib/Tools/build_setup @@ -1,84 +1,85 @@ #!/usr/bin/env bash # # Author: Makarius # # DESCRIPTION: build component for Isabelle/Java setup tool ## sources declare -a SOURCES=( "Build.java" "Environment.java" "Setup.java" ) ## usage PRG=$(basename "$0") function usage() { echo echo "Usage: isabelle $PRG [OPTIONS] COMPONENT_DIR" echo echo " Build component for Isabelle/Java setup tool." echo exit 1 } function fail() { echo "$1" >&2 exit 2 } ## process command line [ "$#" -ge 1 ] && { COMPONENT_DIR="$1"; shift; } [ "$#" -ne 0 -o -z "$COMPONENT_DIR" ] && usage ## main [ -d "$COMPONENT_DIR" ] && fail "Directory already exists: \"$COMPONENT_DIR\"" # build jar TARGET_DIR="$COMPONENT_DIR/lib" mkdir -p "$TARGET_DIR/isabelle/setup" declare -a ARGS=("-Xlint:unchecked") for SRC in "${SOURCES[@]}" do ARGS["${#ARGS[@]}"]="$(platform_path "$ISABELLE_HOME/src/Tools/Setup/isabelle/setup/$SRC")" done -isabelle_jdk javac -d "$TARGET_DIR" -classpath "$(platform_path "$ISABELLE_CLASSPATH")" "${ARGS[@]}" || \ +isabelle_jdk javac $ISABELLE_JAVAC_OPTIONS -d "$TARGET_DIR" \ + -classpath "$(platform_path "$ISABELLE_CLASSPATH")" "${ARGS[@]}" || \ fail "Failed to compile sources" isabelle_jdk jar -c -f "$(platform_path "$TARGET_DIR/isabelle_setup.jar")" \ -e "isabelle.setup.Setup" -C "$TARGET_DIR" isabelle || fail "Failed to produce jar" rm -rf "$TARGET_DIR/isabelle" # etc/settings mkdir -p "$COMPONENT_DIR/etc" cat > "$COMPONENT_DIR/etc/settings" < "$COMPONENT_DIR/README" <&2 "### Isabelle site settings already present! Maybe copied etc/settings in full?"; } ISABELLE_SITE_SETTINGS_PRESENT=true ### ### Default logic ### ISABELLE_LOGIC=HOL ### ### Docs and external files ### # Where to look for docs (multiple dirs separated by ':'). ISABELLE_DOCS="$ISABELLE_HOME/doc" ISABELLE_DOCS_RELEASE_NOTES="~~/ANNOUNCE:~~/README:~~/NEWS:~~/COPYRIGHT:~~/CONTRIBUTORS:~~/contrib/README:~~/src/Tools/jEdit/README:~~/README_REPOSITORY" ISABELLE_DOCS_EXAMPLES="~~/src/HOL/Examples/Seq.thy:~~/src/HOL/Examples/Drinker.thy:~~/src/HOL/Examples/ML.thy:~~/src/HOL/Unix/Unix.thy:~~/src/Tools/SML/Examples.thy:~~/src/Pure/ROOT.ML" # "open" within desktop environment (potentially asynchronous) case "$ISABELLE_PLATFORM_FAMILY" in linux) ISABELLE_OPEN="xdg-open" ;; macos) ISABELLE_OPEN="open" ;; windows) ISABELLE_OPEN="cygstart" ;; esac PDF_VIEWER="$ISABELLE_OPEN" ISABELLE_EXTERNAL_FILES="bmp:eps:gif:jpeg:jpg:pdf:png:xmp" ### ### Symbol rendering ### ISABELLE_SYMBOLS="$ISABELLE_HOME/etc/symbols:$ISABELLE_HOME_USER/etc/symbols" ### ### OCaml ### ISABELLE_OPAM_ROOT="$USER_HOME/.opam" ISABELLE_OCAML_VERSION="ocaml-base-compiler.4.12.0" ### ### Haskell ### ISABELLE_STACK_ROOT="$USER_HOME/.stack" ISABELLE_STACK_RESOLVER="lts-17.10" ISABELLE_GHC_VERSION="ghc-8.10.4" ### ### Misc settings ### ISABELLE_GNUPLOT="gnuplot" ISABELLE_FONTFORGE="fontforge" #ISABELLE_MLTON="/usr/bin/mlton" #ISABELLE_SMLNJ="/usr/bin/sml" #ISABELLE_SWIPL="/usr/bin/swipl"