From b7ef52bfe976f5ca21732c0e56219f9ce4a67e40 Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Wed, 22 Sep 2004 02:37:00 +0000 Subject: [PATCH] More un-hardcoding --- BUILDING | 3 ++- build | 8 +++++--- install | 3 +-- settings | 3 +++ src/settings.sml => settings.sml | 2 ++ src/.cvsignore | 1 + src/config.sml | 6 +++--- src/sources.cm | 2 +- 8 files changed, 18 insertions(+), 10 deletions(-) create mode 100644 settings rename src/settings.sml => settings.sml (92%) diff --git a/BUILDING b/BUILDING index 38265e5..a040dcb 100644 --- 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 --- 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 --- 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 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 diff --git a/src/settings.sml b/settings.sml similarity index 92% rename from src/settings.sml rename to settings.sml index 39a96a4..041bf3c 100644 --- a/src/settings.sml +++ b/settings.sml @@ -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 diff --git a/src/.cvsignore b/src/.cvsignore index ac72ffc..3939bb8 100644 --- a/src/.cvsignore +++ b/src/.cvsignore @@ -3,3 +3,4 @@ CM *.x86-linux *.grm.* *.lex.* +mlt \ No newline at end of file diff --git a/src/config.sml b/src/config.sml index 3ddc0d7..ad3946f 100644 --- a/src/config.sml +++ b/src/config.sml @@ -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, diff --git a/src/sources.cm b/src/sources.cm index 0631a65..9f6ab0e 100644 --- a/src/sources.cm +++ b/src/sources.cm @@ -28,7 +28,7 @@ is $smlnj/compiler/current.cm - settings.sml + ../settings.sml string_map.sml common.sml -- 2.20.1