-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-and-install-min-src-archives
executable file
·63 lines (45 loc) · 1.29 KB
/
build-and-install-min-src-archives
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/bash
# build .zip and .tgz archives with just the source needed to build
# Forlan, along with the shell scripts needed to build an SML/NJ
# heap image for Forlan from this source, and to run it
# installs archives in html directory
# ML-Doc doesn't have to be installed if the src/BASE.sig files are
# newer than the BASE.mldoc files
html=$(cat ../html-directory.txt)
version=$(cat ../version.txt)
echo Building minimum source archives for Forlan Version $version and installing in $html
cd src
change-version $version
sml <<'END_OF_INPUT'
CM.make "forlan.cm";
END_OF_INPUT
cd ..
tmpdir=$$-tmp-$$
mkdir $tmpdir
cd $tmpdir
mkdir forlan-min-src-$version
cd forlan-min-src-$version
cp ../../src/{*.sig,*.sml} .
rm mldoc-tool.sml
cat > forlan.cm <<'END_OF_INPUT'
(* forlan.cm *)
Library
source(-)
is
$/basis.cm
$smlnj/cm.cm
$smlnj/compiler.cm
$smlnj/compiler/compiler.cm
END_OF_INPUT
ls *.sml *.sig >> forlan.cm
cp ../../scripts/* .
cd ..
tar cf forlan-min-src-$version.tar forlan-min-src-$version
gzip forlan-min-src-$version.tar
mv -f forlan-min-src-$version.tar.gz /tmp/forlan-min-src-$version.tgz
zip -r forlan-min-src-$version.zip forlan-min-src-$version
mv -f forlan-min-src-$version.zip /tmp
cd ..
rm -rf $tmpdir
mv /tmp/forlan-min-src-$version.tgz $html
mv /tmp/forlan-min-src-$version.zip $html