SCM Repository
Annotation of /sml/branches/SMLNJ/src/ml-lex/build
Parent Directory
|
Revision Log
Revision 498 - (view) (download)
1 : | monnier | 249 | #!/bin/sh |
2 : | # | ||
3 : | # build script for ml-lex under the new runtime system. | ||
4 : | # | ||
5 : | # options: | ||
6 : | monnier | 498 | # -o image -- specify the name of the heap image, "ml-lex" |
7 : | monnier | 249 | # is the default. |
8 : | # -sml path -- specify the path to the sml executable, "../../bin/sml" | ||
9 : | # is the default. | ||
10 : | |||
11 : | CMD="build" | ||
12 : | |||
13 : | ROOT="ml-lex" | ||
14 : | HEAP_IMAGE="" | ||
15 : | monnier | 498 | TWOUP=`pwd`/../../ |
16 : | BIN=${INSTALLDIR:-$TWOUP}/bin | ||
17 : | SML=$BIN/sml | ||
18 : | monnier | 249 | |
19 : | # | ||
20 : | # process command-line options | ||
21 : | # | ||
22 : | ARGS="" | ||
23 : | while [ "$#" != "0" ] | ||
24 : | do | ||
25 : | arg=$1 | ||
26 : | shift | ||
27 : | case $arg in | ||
28 : | -o) | ||
29 : | if [ "$#" = "0" ]; then | ||
30 : | echo "$CMD: must supply image name for -o option" | ||
31 : | exit 1 | ||
32 : | fi | ||
33 : | HEAP_IMAGE=$1; shift | ||
34 : | ;; | ||
35 : | -sml) | ||
36 : | if [ "$#" = "0" ]; then | ||
37 : | echo "$CMD: must supply path for -sml option" | ||
38 : | exit 1 | ||
39 : | fi | ||
40 : | SML=$1; shift | ||
41 : | ;; | ||
42 : | *) | ||
43 : | ARGS="$ARGS $arg" | ||
44 : | ;; | ||
45 : | esac | ||
46 : | done | ||
47 : | |||
48 : | if [ "$HEAP_IMAGE" = "" ]; then | ||
49 : | HEAP_IMAGE="$ROOT" | ||
50 : | fi | ||
51 : | |||
52 : | $SML $ARGS <<ZZZ | ||
53 : | monnier | 498 | CM.make "ml-lex.cm"; |
54 : | ExportLexGen.export "$HEAP_IMAGE" : unit; | ||
55 : | monnier | 249 | ZZZ |
56 : |
root@smlnj-gforge.cs.uchicago.edu | ViewVC Help |
Powered by ViewVC 1.0.0 |