lib/scripts/isabelle-platform
author wenzelm
Sun, 13 Dec 2020 23:11:41 +0100
changeset 72907 3883f536d84d
parent 72370 e25c0a6cc335
child 72999 f6051c13bffa
permissions -rw-r--r--
unused (see 29566b6810f7);

# -*- 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
      aarch64)
        ISABELLE_PLATFORM64=arm64-linux
        ;;
      arm*)
        ISABELLE_PLATFORM32=arm32-linux
        ;;
      *)
        ISABELLE_PLATFORM32=x86-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_PLATFORM32=x86-darwin
        ISABELLE_PLATFORM64=x86_64-darwin
        ;;
      *)
        ISABELLE_PLATFORM64=x86_64-darwin
        ;;
    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
        ;;
      i?86)
        ISABELLE_PLATFORM32=x86-cygwin
        ;;
    esac
    ;;
esac