Blob Blame History Raw
From e60e48c21d5680d03e7d42bf03b9468548e08265 Mon Sep 17 00:00:00 2001
From: Matthew Fluet <matthew.fluet@gmail.com>
Date: Thu, 15 Feb 2018 14:28:03 -0500
Subject: [PATCH 1/5] Lift customized variables to top of `./bin/mlton-script`

---
 bin/mlton-script | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/bin/mlton-script b/bin/mlton-script
index de5846f2f..146b9efba 100644
--- a/bin/mlton-script
+++ b/bin/mlton-script
@@ -2,6 +2,17 @@
 
 # This script calls MLton.
 
+
+EXE=
+
+CC="gcc"
+
+# You may need to set 'GMP_INC_DIR' so the C compiler can find gmp.h.
+GMP_INC_DIR=
+# You may need to set 'GMP_LIB_DIR' so the C compiler can find libgmp.
+GMP_LIB_DIR=
+
+
 set -e
 
 dir=`dirname "$0"`
@@ -24,8 +35,6 @@ case "$1" in
         ;;
 esac
 
-EXE=
-
 doitMLton () {
     mlton_mlton="$lib/mlton-compile$EXE"
     if [ -x "$mlton_mlton" ]; then
@@ -57,15 +66,9 @@ doit () {
     exit 1
 }
 
-CC="gcc"
-
-# You may need to set 'GMP_INC_DIR' so the C compiler can find gmp.h.
-GMP_INC_DIR=
 if [ -n "$GMP_INC_DIR" ]; then
 gmpCCOpts="-cc-opt -I$GMP_INC_DIR"
 fi
-# You may need to set 'GMP_LIB_DIR' so the C compiler can find libgmp.
-GMP_LIB_DIR=
 if [ -n "$GMP_LIB_DIR" ]; then
 gmpLinkOpts="-link-opt -L$GMP_LIB_DIR -target-link-opt netbsd -Wl,-R$GMP_LIB_DIR"
 fi
-- 
2.14.3