Automatically generate settings.sml
[bpt/mlt.git] / build
CommitLineData
c0a3b488
AC
1#!/bin/sh
2
b7ef52bf
AC
3source settings
4
5echo $SMLBIN/sml @SMLload=$BIN/mlt.$PLATFORM >src/mlt
0b312c7c 6chmod +x src/mlt
c0a3b488 7
e450a3e2
AC
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
c0a3b488
AC
15cd src
16
dc3b1a7f
AC
17if [ -f mlt.$PLATFORM ] ; then
18 rm mlt.$PLATFORM
c0a3b488
AC
19fi
20if [ -d CM ] ; then
21 rm -rf CM
22fi
23if [ -d lib/CM ] ; then
24 rm -rf lib/CM
25fi
f1b55b48
AC
26if [ -d .cm ] ; then
27 rm -rf .cm
28fi
29if [ -d lib/.cm ] ; then
30 rm -rf lib/.cm
31fi
c0a3b488
AC
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
b7ef52bf
AC
45fi
46