More un-hardcoding
authorAdam Chlipala <adamc@hcoop.net>
Wed, 22 Sep 2004 02:37:00 +0000 (02:37 +0000)
committerAdam Chlipala <adamc@hcoop.net>
Wed, 22 Sep 2004 02:37:00 +0000 (02:37 +0000)
BUILDING
build
install
settings [new file with mode: 0644]
settings.sml [moved from src/settings.sml with 92% similarity]
src/.cvsignore
src/config.sml
src/sources.cm

index 38265e5..a040dcb 100644 (file)
--- a/BUILDING
+++ b/BUILDING
@@ -13,7 +13,8 @@ internals, and they may change often.
 Configuration
 =============
 
-Modify the parameters in settings.sml as appropriate for your system.
+Modify the parameters in settings and src/settings.sml as appropriate
+for your system.
 
 If it is possible for you to modify a file /etc/mlt.conf, then you
 can edit this file to set various options related to locations of
diff --git a/build b/build
index 98b1f5c..05add6d 100755 (executable)
--- a/build
+++ b/build
@@ -1,7 +1,8 @@
 #!/bin/sh
 
-SMLBIN=/usr/local/sml/bin
-PLATFORM=x86-linux
+source settings
+
+echo $SMLBIN/sml @SMLload=$BIN/mlt.$PLATFORM >src/mlt
 
 cd src
 
@@ -33,4 +34,5 @@ cd lib
 
 if ! cat build.sml | $SMLBIN/sml ; then
     exit 1
-fi
\ No newline at end of file
+fi
+
diff --git a/install b/install
index 8a5b10c..6c4be03 100755 (executable)
--- a/install
+++ b/install
@@ -1,5 +1,4 @@
-BIN=/usr/local/bin
-PLATFORM=x86-linux
+source settings
 
 cp src/mlt $BIN/
 cp src/mlt.$PLATFORM $BIN/
\ No newline at end of file
diff --git a/settings b/settings
new file mode 100644 (file)
index 0000000..b549bfe
--- /dev/null
+++ b/settings
@@ -0,0 +1,3 @@
+BIN=/usr/local/bin
+SMLBIN=/usr/local/sml/bin
+PLATFORM=x86-linux
\ No newline at end of file
similarity index 92%
rename from src/settings.sml
rename to settings.sml
index 39a96a4..041bf3c 100644 (file)
@@ -23,4 +23,6 @@ structure Settings =
 struct
     val arch = "x86-linux"
     val defaultFile = "/etc/mlt.conf"
+    val smlbin = "/usr/local/sml/bin"
+    val mltdir = "/usr/local/share/mlt"
 end
\ No newline at end of file
index ac72ffc..3939bb8 100644 (file)
@@ -3,3 +3,4 @@ CM
 *.x86-linux
 *.grm.*
 *.lex.*
+mlt
\ No newline at end of file
index 3ddc0d7..ad3946f 100644 (file)
@@ -137,9 +137,9 @@ struct
        let
            val cwd = OS.FileSys.getDir ()
        
-           val base = CONFIG {lib = "/usr/local/share/mlt/src/lib/sources.cm",
-                              compiler = "/usr/local/share/mlt/src/sources.cm",
-                              sml = "/usr/local/sml/bin",
+           val base = CONFIG {lib = mltdir ^ "/src/lib/sources.cm",
+                              compiler = mltdir ^ "/src/sources.cm",
+                              sml = smlbin,
                               inPath = cwd,
                               outPath = cwd,
                               pubPath = cwd,
index 0631a65..9f6ab0e 100644 (file)
@@ -28,7 +28,7 @@ is
 
        $smlnj/compiler/current.cm
 
-       settings.sml
+       ../settings.sml
 
        string_map.sml
        common.sml