diff --git a/lib/scripts/getsettings b/lib/scripts/getsettings --- a/lib/scripts/getsettings +++ b/lib/scripts/getsettings @@ -1,125 +1,125 @@ # -*- shell-script -*- :mode=shellscript: # # Author: Makarius # # Static Isabelle environment for root of process tree. export ISABELLE_HOME export BASH_ENV="$ISABELLE_HOME/lib/scripts/getfunctions" source "$BASH_ENV" if [ -z "$ISABELLE_SETTINGS_PRESENT" ] then export ISABELLE_SETTINGS_PRESENT=true set -o allexport #sane environment defaults (notably on Mac OS X) if [ "$ISABELLE_APP" = true -a -x /usr/libexec/path_helper ]; then eval $(/usr/libexec/path_helper -s) fi #Cygwin vs. POSIX if [ "$OSTYPE" = cygwin ] then unset INI_DIR if [ -n "$TEMP_WINDOWS" ]; then TMPDIR="$(cygpath -u "$TEMP_WINDOWS")" TMP="$TMPDIR" TEMP="$TMPDIR" fi if [ -z "$USER_HOME" ]; then USER_HOME="$(cygpath -u "$USERPROFILE")" fi CYGWIN_ROOT="$(platform_path "/")" ISABELLE_ROOT="$(platform_path "$ISABELLE_HOME")" ISABELLE_CLASSPATH="$(cygpath -i -u -p "$CLASSPATH")" unset CLASSPATH else if [ -z "$USER_HOME" ]; then USER_HOME="$HOME" fi ISABELLE_ROOT="$ISABELLE_HOME" ISABELLE_CLASSPATH="$CLASSPATH" unset CLASSPATH fi #main executables ISABELLE_TOOL="$ISABELLE_HOME/bin/isabelle" ISABELLE_SCALA_SCRIPT="$ISABELLE_HOME/bin/isabelle_scala_script" PATH="$ISABELLE_HOME/bin:$PATH" #platform source "$ISABELLE_HOME/lib/scripts/isabelle-platform" -if [ -z "$ISABELLE_PLATFORM" ]; then +if [ -z "$ISABELLE_PLATFORM32" -a -z "$ISABELLE_PLATFORM64" ]; then echo 1>&2 "Failed to determine hardware and operating system type!" exit 2 fi #Isabelle distribution identifier -- filled in automatically! ISABELLE_ID="" [ -z "$ISABELLE_IDENTIFIER" ] && ISABELLE_IDENTIFIER="" # components ISABELLE_COMPONENTS="" ISABELLE_COMPONENTS_MISSING="" #main components init_component "$ISABELLE_HOME" [ -d "$ISABELLE_HOME/Admin" ] && init_component "$ISABELLE_HOME/Admin" if [ -d "$ISABELLE_HOME_USER" ]; then init_component "$ISABELLE_HOME_USER" else mkdir -p "$ISABELLE_HOME_USER" chmod $(umask -S) "$ISABELLE_HOME_USER" fi #POLYML_EXE if [ "$ISABELLE_PLATFORM_FAMILY" = "windows" ]; then POLYML_EXE="$ML_HOME/poly.exe" else POLYML_EXE="$ML_HOME/poly" fi #ML system identifier if [ -z "$ML_PLATFORM" ]; then ML_IDENTIFIER="$ML_SYSTEM" else ML_IDENTIFIER="${ML_SYSTEM}_${ML_PLATFORM}" fi #enforce ISABELLE_OCAMLFIND if [ -d "$ISABELLE_OPAM_ROOT/$ISABELLE_OCAML_VERSION/bin" ]; then ISABELLE_OCAMLFIND="$ISABELLE_HOME/lib/scripts/ocamlfind" fi #enforce ISABELLE_GHC if [ -f "$ISABELLE_STACK_ROOT/ISABELLE_GHC_EXE-$ISABELLE_PLATFORM_FAMILY" ]; then if [ -f "$(cat "$ISABELLE_STACK_ROOT/ISABELLE_GHC_EXE-$ISABELLE_PLATFORM_FAMILY")" ]; then ISABELLE_GHC="$ISABELLE_HOME/lib/scripts/ghc" ISABELLE_GHC_STACK=true fi fi #enforce JAVA_HOME if [ -d "$ISABELLE_JDK_HOME/jre" ] then export JAVA_HOME="$ISABELLE_JDK_HOME/jre" else export JAVA_HOME="$ISABELLE_JDK_HOME" fi set +o allexport fi diff --git a/lib/scripts/isabelle-platform b/lib/scripts/isabelle-platform --- a/lib/scripts/isabelle-platform +++ b/lib/scripts/isabelle-platform @@ -1,60 +1,43 @@ # -*- shell-script -*- :mode=shellscript: # # determine general hardware and operating system type for Isabelle system tools # ISABELLE_PLATFORM_FAMILY="" ISABELLE_PLATFORM32="" ISABELLE_PLATFORM64="" ISABELLE_WINDOWS_PLATFORM32="" ISABELLE_WINDOWS_PLATFORM64="" case $(uname -s) in Linux) ISABELLE_PLATFORM_FAMILY="linux" - case $(uname -m) in - i?86) - ISABELLE_PLATFORM32=x86-linux - ;; - x86_64) - ISABELLE_PLATFORM32=x86-linux - ISABELLE_PLATFORM64=x86_64-linux - ;; - esac + ISABELLE_PLATFORM32=x86-linux + ISABELLE_PLATFORM64=x86_64-linux ;; Darwin) ISABELLE_PLATFORM_FAMILY="macos" - case $(uname -m) in - i?86) + case $(sw_vers -productVersion) in + 10.10*|10.11*|10.12*|10.13*|10.14*) ISABELLE_PLATFORM32=x86-darwin - if [ "$(sysctl -n hw.optional.x86_64 2>/dev/null)" = 1 ]; then - ISABELLE_PLATFORM64=x86_64-darwin - fi + ISABELLE_PLATFORM64=x86_64-darwin ;; - x86_64) - ISABELLE_PLATFORM32=x86-darwin + *) ISABELLE_PLATFORM64=x86_64-darwin ;; esac ;; CYGWIN_NT*) ISABELLE_PLATFORM_FAMILY="windows" - if [ "$PROCESSOR_ARCHITECTURE" = "AMD64" -o "$PROCESSOR_ARCHITEW6432" = "AMD64" ]; then - ISABELLE_WINDOWS_PLATFORM32="x86-windows" - ISABELLE_WINDOWS_PLATFORM64="x86_64-windows" - else - ISABELLE_WINDOWS_PLATFORM32="x86-windows" - fi + ISABELLE_WINDOWS_PLATFORM32="x86-windows" + ISABELLE_WINDOWS_PLATFORM64="x86_64-windows" case $(uname -m) in x86_64) ISABELLE_PLATFORM64=x86_64-cygwin ;; i?86) ISABELLE_PLATFORM32=x86-cygwin ;; esac ;; esac - -ISABELLE_PLATFORM="${ISABELLE_PLATFORM32:-$ISABELLE_PLATFORM64}" -ISABELLE_WINDOWS_PLATFORM="${ISABELLE_WINDOWS_PLATFORM32:-$ISABELLE_WINDOWS_PLATFORM64}"