Automatically generate settings.sml
[bpt/mlt.git] / build
diff --git a/build b/build
index 98b1f5c..3a81c01 100755 (executable)
--- a/build
+++ b/build
@@ -1,7 +1,16 @@
 #!/bin/sh
 
-SMLBIN=/usr/local/sml/bin
-PLATFORM=x86-linux
+source settings
+
+echo $SMLBIN/sml @SMLload=$BIN/mlt.$PLATFORM >src/mlt
+chmod +x src/mlt
+
+echo structure Settings = struct >settings.sml
+echo "    val arch = \"$PLATFORM\"" >>settings.sml
+echo "    val defaultFile = \"$DEFAULT\"" >>settings.sml
+echo "    val smlbin = \"$SMLBIN\"" >>settings.sml
+echo "    val mltdir = \"$MLTDIR\"" >>settings.sml
+echo end >>settings.sml
 
 cd src
 
@@ -33,4 +42,5 @@ cd lib
 
 if ! cat build.sml | $SMLBIN/sml ; then
     exit 1
-fi
\ No newline at end of file
+fi
+