Admin/polyml/settings
author wenzelm
Wed, 16 Mar 2016 22:19:08 +0100
changeset 62645 a2351f82bc48
parent 61740 d7e0315fe423
child 64544 d23b7c9b9dd4
permissions -rw-r--r--
eliminated spurious Unicode, which is in conflict with Isabelle symbol interpretation;

# -*- 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.6
      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