lib/scripts/isabelle-platform
author wenzelm
Fri, 26 Nov 2021 13:45:28 +0100
changeset 74849 a763f94c2c32
parent 73671 7404f2e1d092
child 79994 9b532f064649
permissions -rw-r--r--
Added tag Isabelle2021-1-RC4 for changeset 2336356d4180

# -*- shell-script -*- :mode=shellscript:
#
# determine general hardware and operating system type for Isabelle system tools
#

ISABELLE_PLATFORM_FAMILY=""
ISABELLE_PLATFORM64=""
ISABELLE_APPLE_PLATFORM64=""
ISABELLE_WINDOWS_PLATFORM32=""
ISABELLE_WINDOWS_PLATFORM64=""

case $(uname -s) in
  Linux)
    ISABELLE_PLATFORM_FAMILY="linux"
    case $(uname -m) in
      aarch64)
        ISABELLE_PLATFORM64=arm64-linux
        ;;
      *)
        ISABELLE_PLATFORM64=x86_64-linux
        ;;
    esac
    ;;
  Darwin)
    ISABELLE_PLATFORM_FAMILY="macos"
    case $(sw_vers -productVersion) in
      10.10*|10.11*|10.12*|10.13*|10.14*)
        ISABELLE_PLATFORM64=x86_64-darwin
        ;;
      *)
        ISABELLE_PLATFORM64=x86_64-darwin
        case $(uname -a) in
          *arm64*|*ARM64*)
            ISABELLE_APPLE_PLATFORM64=arm64-darwin
            ;;
          *)
            ;;
        esac
        ;;
    esac
    ;;
  CYGWIN_NT*)
    ISABELLE_PLATFORM_FAMILY="windows"
    ISABELLE_WINDOWS_PLATFORM32="x86-windows"
    ISABELLE_WINDOWS_PLATFORM64="x86_64-windows"
    case $(uname -m) in
      x86_64)
        ISABELLE_PLATFORM64=x86_64-cygwin
        ;;
    esac
    ;;
esac