Admin/polyml/settings
author wenzelm
Fri, 11 Sep 2015 21:44:39 +0200
changeset 61161 8fbab2f3433f
parent 61158 ea6a4c8bc722
child 61740 d7e0315fe423
permissions -rw-r--r--
fully detached test run, to avoid flashing window on Windows with Cygwin-Terminal;

# -*- shell-script -*- :mode=shellscript:

POLYML_HOME="$COMPONENT"


# platform preference

if grep "ML_system_64.*=.*true" "$ISABELLE_HOME_USER/etc/preferences" >/dev/null 2>/dev/null
then
  ML_SYSTEM_64="true"
else
  ML_SYSTEM_64="false"
fi

case "${ISABELLE_PLATFORM}:${ML_SYSTEM_64}" in
  x86-cygwin:true)
    PLATFORMS="x86_64-windows x86-windows"
    ;;
  x86-cygwin:*)
    PLATFORMS="x86-windows x86_64-windows"
    ;;
  *:true)
    PLATFORMS="$ISABELLE_PLATFORM64 $ISABELLE_PLATFORM32"
    ;;
  *)
    PLATFORMS="$ISABELLE_PLATFORM32 $ISABELLE_PLATFORM64"
    ;;
esac


# check executable

unset ML_HOME

for PLATFORM in $PLATFORMS
do
  if [ -z "$ML_HOME" ]
  then
    if "$POLYML_HOME/$PLATFORM/polyml" -v </dev/null >/dev/null 2>/dev/null
    then

      # ML settings

      ML_SYSTEM=polyml-5.5.3
      ML_PLATFORM="$PLATFORM"
      ML_HOME="$POLYML_HOME/$ML_PLATFORM"
      ML_SOURCES="$POLYML_HOME/src"

      case "$ML_PLATFORM" in
        x86_64-windows)
          ML_OPTIONS="-H 1000 --codepage utf8"
          ;;
        x86-windows)
          ML_OPTIONS="-H 500 --codepage utf8"
          ;;
        x86_64-*)
          ML_OPTIONS="-H 1000"
          ;;
        *)
          ML_OPTIONS="-H 500"
          ;;
      esac

    fi
  fi
done

unset PLATFORM
unset PLATFORMS