Automatically generate mlt.conf
[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
eb3c2c89
AC
15echo "compiler $MLTDIR/src/sources.cm" >mlt.conf
16echo "lib $MLTDIR/src/lib/sources.cm" >>mlt.conf
17cat mlt.conf.base >>mlt.conf
18
c0a3b488
AC
19cd src
20
dc3b1a7f
AC
21if [ -f mlt.$PLATFORM ] ; then
22 rm mlt.$PLATFORM
c0a3b488
AC
23fi
24if [ -d CM ] ; then
25 rm -rf CM
26fi
27if [ -d lib/CM ] ; then
28 rm -rf lib/CM
29fi
f1b55b48
AC
30if [ -d .cm ] ; then
31 rm -rf .cm
32fi
33if [ -d lib/.cm ] ; then
34 rm -rf lib/.cm
35fi
c0a3b488
AC
36
37if ! cat build.sml | $SMLBIN/sml ; then
38 exit 1
39fi
40
41if ! $SMLBIN/ml-build sources.cm Main.main mlt ; then
42 exit 1
43fi
44
45cd lib
46
47if ! cat build.sml | $SMLBIN/sml ; then
48 exit 1
b7ef52bf
AC
49fi
50