[MLton-commit] r7125

Matthew Fluet fluet at mlton.org
Wed Jun 10 20:23:33 PDT 2009


Some SML/NJ installs don't put .arch-n-opsys on PATH.
----------------------------------------------------------------------

U   mlton/trunk/bin/mlton-script

----------------------------------------------------------------------

Modified: mlton/trunk/bin/mlton-script
===================================================================
--- mlton/trunk/bin/mlton-script	2009-06-11 03:23:29 UTC (rev 7124)
+++ mlton/trunk/bin/mlton-script	2009-06-11 03:23:31 UTC (rev 7125)
@@ -19,11 +19,9 @@
 mlton="$lib/mlton-compile$exe"
 
 smlnj='sml'
-# Try to use the SML/NJ .arch-n-opsys
-if .arch-n-opsys >/dev/null 2>&1; then
-        eval `.arch-n-opsys`
-        mlton_smlnj_heap="$lib/mlton-smlnj.$HEAP_SUFFIX"
-        unset `.arch-n-opsys | sed 's#=[^ ]*##g'`
+if $smlnj -h >/dev/null 2>&1; then
+        smlnj_heap_suffix=`echo 'TextIO.output (TextIO.stdErr, SMLofNJ.SysInfo.getHeapSuffix ());' | $smlnj 2>&1 1> /dev/null`
+        mlton_smlnj_heap="$lib/mlton-smlnj.$smlnj_heap_suffix"
 else
         mlton_smlnj_heap=""
 fi




More information about the MLton-commit mailing list