lib/scripts/isabelle-platform
author wenzelm
Sat, 19 Oct 2024 16:27:00 +0200
changeset 81197 794b10baf0de
parent 79995 e94a36467f4e
permissions -rw-r--r--
clarified signature;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
37012
106c56e916f8 enable shell script editor mode;
wenzelm
parents: 36213
diff changeset
     1
# -*- shell-script -*- :mode=shellscript:
36196
cbb9ee265cdd added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff changeset
     2
#
66731
fe2a6ec20b4d discontinued rudiments of BSD support;
wenzelm
parents: 66691
diff changeset
     3
# determine general hardware and operating system type for Isabelle system tools
36196
cbb9ee265cdd added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff changeset
     4
#
cbb9ee265cdd added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff changeset
     5
50182
30177ec0be36 added ISABELLE_PLATFORM_FAMILY;
wenzelm
parents: 48455
diff changeset
     6
ISABELLE_PLATFORM_FAMILY=""
36196
cbb9ee265cdd added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff changeset
     7
ISABELLE_PLATFORM64=""
72999
f6051c13bffa support ISABELLE_APPLE_PLATFORM64 (Apple Silicon);
wenzelm
parents: 72370
diff changeset
     8
ISABELLE_APPLE_PLATFORM64=""
65072
36c650d1a90d more detailed platform information;
wenzelm
parents: 62911
diff changeset
     9
ISABELLE_WINDOWS_PLATFORM32=""
36c650d1a90d more detailed platform information;
wenzelm
parents: 62911
diff changeset
    10
ISABELLE_WINDOWS_PLATFORM64=""
36196
cbb9ee265cdd added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff changeset
    11
cbb9ee265cdd added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff changeset
    12
case $(uname -s) in
cbb9ee265cdd added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff changeset
    13
  Linux)
50182
30177ec0be36 added ISABELLE_PLATFORM_FAMILY;
wenzelm
parents: 48455
diff changeset
    14
    ISABELLE_PLATFORM_FAMILY="linux"
72344
728da67527b9 detect arm64-linux platform;
wenzelm
parents: 71342
diff changeset
    15
    case $(uname -m) in
728da67527b9 detect arm64-linux platform;
wenzelm
parents: 71342
diff changeset
    16
      aarch64)
728da67527b9 detect arm64-linux platform;
wenzelm
parents: 71342
diff changeset
    17
        ISABELLE_PLATFORM64=arm64-linux
728da67527b9 detect arm64-linux platform;
wenzelm
parents: 71342
diff changeset
    18
        ;;
728da67527b9 detect arm64-linux platform;
wenzelm
parents: 71342
diff changeset
    19
      *)
728da67527b9 detect arm64-linux platform;
wenzelm
parents: 71342
diff changeset
    20
        ISABELLE_PLATFORM64=x86_64-linux
728da67527b9 detect arm64-linux platform;
wenzelm
parents: 71342
diff changeset
    21
        ;;
728da67527b9 detect arm64-linux platform;
wenzelm
parents: 71342
diff changeset
    22
    esac
36196
cbb9ee265cdd added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff changeset
    23
    ;;
cbb9ee265cdd added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff changeset
    24
  Darwin)
50182
30177ec0be36 added ISABELLE_PLATFORM_FAMILY;
wenzelm
parents: 48455
diff changeset
    25
    ISABELLE_PLATFORM_FAMILY="macos"
79995
e94a36467f4e obsolete: base-line is macOS 11;
wenzelm
parents: 79994
diff changeset
    26
    ISABELLE_PLATFORM64=x86_64-darwin
e94a36467f4e obsolete: base-line is macOS 11;
wenzelm
parents: 79994
diff changeset
    27
    case $(uname -a) in
e94a36467f4e obsolete: base-line is macOS 11;
wenzelm
parents: 79994
diff changeset
    28
      *arm64*|*ARM64*)
e94a36467f4e obsolete: base-line is macOS 11;
wenzelm
parents: 79994
diff changeset
    29
        ISABELLE_APPLE_PLATFORM64=arm64-darwin
36196
cbb9ee265cdd added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff changeset
    30
        ;;
71342
d72d4a9316c9 updated platform situation: 32bit variants are marginal or absent;
wenzelm
parents: 66731
diff changeset
    31
      *)
36213
4df49260bd82 accept x86_64 results gracefully -- NB: Mac OS does report that if booted in 64 bit mode;
wenzelm
parents: 36196
diff changeset
    32
        ;;
36196
cbb9ee265cdd added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff changeset
    33
    esac
cbb9ee265cdd added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff changeset
    34
    ;;
cbb9ee265cdd added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff changeset
    35
  CYGWIN_NT*)
50182
30177ec0be36 added ISABELLE_PLATFORM_FAMILY;
wenzelm
parents: 48455
diff changeset
    36
    ISABELLE_PLATFORM_FAMILY="windows"
71342
d72d4a9316c9 updated platform situation: 32bit variants are marginal or absent;
wenzelm
parents: 66731
diff changeset
    37
    ISABELLE_WINDOWS_PLATFORM32="x86-windows"
d72d4a9316c9 updated platform situation: 32bit variants are marginal or absent;
wenzelm
parents: 66731
diff changeset
    38
    ISABELLE_WINDOWS_PLATFORM64="x86_64-windows"
79994
9b532f064649 more robust: always assume x86_64 (or its emulation on ARM);
wenzelm
parents: 73671
diff changeset
    39
    ISABELLE_PLATFORM64=x86_64-cygwin
36196
cbb9ee265cdd added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff changeset
    40
    ;;
cbb9ee265cdd added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff changeset
    41
esac