Admin/polyml/settings
changeset 69704 3fb94d9b87b0
parent 67581 30f412d1d7c3
child 69822 8c587dd44f51
equal deleted inserted replaced
69703:1e30b4093924 69704:3fb94d9b87b0
     1 # -*- shell-script -*- :mode=shellscript:
     1 # -*- shell-script -*- :mode=shellscript:
     2 
     2 
     3 POLYML_HOME="$COMPONENT"
     3 POLYML_HOME="$COMPONENT"
     4 
     4 
     5 
     5 ML_PLATFORM="${ISABELLE_WINDOWS_PLATFORM64:-${ISABELLE_PLATFORM64}}"
     6 # platform preference
       
     7 
     6 
     8 if grep "ML_system_64.*=.*true" "$ISABELLE_HOME_USER/etc/preferences" >/dev/null 2>/dev/null
     7 if grep "ML_system_64.*=.*true" "$ISABELLE_HOME_USER/etc/preferences" >/dev/null 2>/dev/null
     9 then
     8 then
    10   ML_SYSTEM_64="true"
     9   ML_OPTIONS="--minheap 1000"
    11 else
    10 else
    12   ML_SYSTEM_64="false"
    11   ML_PLATFORM="${ML_PLATFORM/x86_64/x86_64_32}"
       
    12   ML_OPTIONS="--minheap 500"
    13 fi
    13 fi
    14 
    14 
    15 case "${ISABELLE_PLATFORM_FAMILY}:${ML_SYSTEM_64}" in
    15 ML_SYSTEM=polyml-5.7.1
    16   windows:true)
    16 ML_HOME="$POLYML_HOME/$ML_PLATFORM"
    17     PLATFORMS="x86_64-windows x86-windows"
    17 ML_SOURCES="$POLYML_HOME/src"
    18     ;;
       
    19   windows:*)
       
    20     PLATFORMS="x86-windows x86_64-windows"
       
    21     ;;
       
    22   *:true)
       
    23     PLATFORMS="$ISABELLE_PLATFORM64 $ISABELLE_PLATFORM32"
       
    24     ;;
       
    25   *)
       
    26     PLATFORMS="$ISABELLE_PLATFORM32 $ISABELLE_PLATFORM64"
       
    27     ;;
       
    28 esac
       
    29 
       
    30 
       
    31 # check executable
       
    32 
       
    33 unset ML_HOME
       
    34 
       
    35 for PLATFORM in $PLATFORMS
       
    36 do
       
    37   if [ -z "$ML_HOME" ]
       
    38   then
       
    39     if "$POLYML_HOME/$PLATFORM/poly" -v </dev/null >/dev/null 2>/dev/null
       
    40     then
       
    41 
       
    42       # ML settings
       
    43 
       
    44       ML_SYSTEM=polyml-5.7.1
       
    45       ML_PLATFORM="$PLATFORM"
       
    46       ML_HOME="$POLYML_HOME/$ML_PLATFORM"
       
    47       ML_SOURCES="$POLYML_HOME/src"
       
    48 
       
    49       case "$ML_PLATFORM" in
       
    50         x86_64-windows)
       
    51           ML_OPTIONS="--minheap 1000 --codepage utf8"
       
    52           ;;
       
    53         x86-windows)
       
    54           ML_OPTIONS="--minheap 500 --codepage utf8"
       
    55           ;;
       
    56         x86_64-*)
       
    57           ML_OPTIONS="--minheap 1000"
       
    58           ;;
       
    59         *)
       
    60           ML_OPTIONS="--minheap 500"
       
    61           ;;
       
    62       esac
       
    63 
       
    64     fi
       
    65   fi
       
    66 done
       
    67 
       
    68 unset PLATFORM
       
    69 unset PLATFORMS