Automatically generate settings.sml
[bpt/mlt.git] / build
... / ...
CommitLineData
1#!/bin/sh
2
3source settings
4
5echo $SMLBIN/sml @SMLload=$BIN/mlt.$PLATFORM >src/mlt
6chmod +x src/mlt
7
8echo structure Settings = struct >settings.sml
9echo " val arch = \"$PLATFORM\"" >>settings.sml
10echo " val defaultFile = \"$DEFAULT\"" >>settings.sml
11echo " val smlbin = \"$SMLBIN\"" >>settings.sml
12echo " val mltdir = \"$MLTDIR\"" >>settings.sml
13echo end >>settings.sml
14
15cd src
16
17if [ -f mlt.$PLATFORM ] ; then
18 rm mlt.$PLATFORM
19fi
20if [ -d CM ] ; then
21 rm -rf CM
22fi
23if [ -d lib/CM ] ; then
24 rm -rf lib/CM
25fi
26if [ -d .cm ] ; then
27 rm -rf .cm
28fi
29if [ -d lib/.cm ] ; then
30 rm -rf lib/.cm
31fi
32
33if ! cat build.sml | $SMLBIN/sml ; then
34 exit 1
35fi
36
37if ! $SMLBIN/ml-build sources.cm Main.main mlt ; then
38 exit 1
39fi
40
41cd lib
42
43if ! cat build.sml | $SMLBIN/sml ; then
44 exit 1
45fi
46