lib/scripts/isabelle-platform
author wenzelm
Wed Nov 01 17:29:14 2017 +0100 (19 months ago)
changeset 66980 8947cf58cb86
parent 66731 fe2a6ec20b4d
permissions -rw-r--r--
tuned output;
     1 # -*- shell-script -*- :mode=shellscript:
     2 #
     3 # determine general hardware and operating system type for Isabelle system tools
     4 #
     5 
     6 ISABELLE_PLATFORM_FAMILY=""
     7 ISABELLE_PLATFORM32=""
     8 ISABELLE_PLATFORM64=""
     9 ISABELLE_WINDOWS_PLATFORM32=""
    10 ISABELLE_WINDOWS_PLATFORM64=""
    11 
    12 case $(uname -s) in
    13   Linux)
    14     ISABELLE_PLATFORM_FAMILY="linux"
    15     case $(uname -m) in
    16       i?86)
    17         ISABELLE_PLATFORM32=x86-linux
    18         ;;
    19       x86_64)
    20         ISABELLE_PLATFORM32=x86-linux
    21         ISABELLE_PLATFORM64=x86_64-linux
    22         ;;
    23     esac
    24     ;;
    25   Darwin)
    26     ISABELLE_PLATFORM_FAMILY="macos"
    27     case $(uname -m) in
    28       i?86)
    29         ISABELLE_PLATFORM32=x86-darwin
    30         if [ "$(sysctl -n hw.optional.x86_64 2>/dev/null)" = 1 ]; then
    31           ISABELLE_PLATFORM64=x86_64-darwin
    32         fi
    33         ;;
    34       x86_64)
    35         ISABELLE_PLATFORM32=x86-darwin
    36         ISABELLE_PLATFORM64=x86_64-darwin
    37         ;;
    38     esac
    39     ;;
    40   CYGWIN_NT*)
    41     ISABELLE_PLATFORM_FAMILY="windows"
    42     if [ "$PROCESSOR_ARCHITECTURE" = "AMD64" -o "$PROCESSOR_ARCHITEW6432" = "AMD64" ]; then
    43       ISABELLE_WINDOWS_PLATFORM32="x86-windows"
    44       ISABELLE_WINDOWS_PLATFORM64="x86_64-windows"
    45     else
    46       ISABELLE_WINDOWS_PLATFORM32="x86-windows"
    47     fi
    48     case $(uname -m) in
    49       x86_64)
    50         ISABELLE_PLATFORM64=x86_64-cygwin
    51         ;;
    52       i?86)
    53         ISABELLE_PLATFORM32=x86-cygwin
    54         ;;
    55     esac
    56     ;;
    57 esac
    58 
    59 ISABELLE_PLATFORM="${ISABELLE_PLATFORM32:-$ISABELLE_PLATFORM64}"
    60 ISABELLE_WINDOWS_PLATFORM="${ISABELLE_WINDOWS_PLATFORM32:-$ISABELLE_WINDOWS_PLATFORM64}"