SCM Repository
Annotation of /sml/trunk/src/ml-lex/build
Parent Directory
|
Revision Log
Revision 2 - (view) (download)
1 : | monnier | 2 | #!/bin/sh |
2 : | # | ||
3 : | # build script for ml-lex under the new runtime system. | ||
4 : | # | ||
5 : | # options: | ||
6 : | # -arch arch -- specify the architecture, "heap" is the default. | ||
7 : | # -o image -- specify the name of the heap image, "ml-lex.ARCH" | ||
8 : | # is the default. | ||
9 : | # -sml path -- specify the path to the sml executable, "../../bin/sml" | ||
10 : | # is the default. | ||
11 : | |||
12 : | CMD="build" | ||
13 : | |||
14 : | ROOT="ml-lex" | ||
15 : | HEAP_IMAGE="" | ||
16 : | ARCH="heap" | ||
17 : | BIN="../../bin" | ||
18 : | SML="$BIN/sml" | ||
19 : | |||
20 : | # | ||
21 : | # determine the host architecture | ||
22 : | # | ||
23 : | ARCH_N_OPSYS=`$BIN/.arch-n-opsys` | ||
24 : | if [ $? != "0" ]; then | ||
25 : | echo "$CMD: unable to determine architecture/operating system" | ||
26 : | exit 1 | ||
27 : | fi | ||
28 : | eval $ARCH_N_OPSYS | ||
29 : | |||
30 : | # | ||
31 : | # process command-line options | ||
32 : | # | ||
33 : | ARGS="" | ||
34 : | while [ "$#" != "0" ] | ||
35 : | do | ||
36 : | arg=$1 | ||
37 : | shift | ||
38 : | case $arg in | ||
39 : | -arch) | ||
40 : | if [ "$#" = "0" ]; then | ||
41 : | echo "$CMD: must supply architecture for -arch option" | ||
42 : | exit 1 | ||
43 : | fi | ||
44 : | ARCH=$1; shift | ||
45 : | ;; | ||
46 : | -o) | ||
47 : | if [ "$#" = "0" ]; then | ||
48 : | echo "$CMD: must supply image name for -o option" | ||
49 : | exit 1 | ||
50 : | fi | ||
51 : | HEAP_IMAGE=$1; shift | ||
52 : | ;; | ||
53 : | -sml) | ||
54 : | if [ "$#" = "0" ]; then | ||
55 : | echo "$CMD: must supply path for -sml option" | ||
56 : | exit 1 | ||
57 : | fi | ||
58 : | SML=$1; shift | ||
59 : | ;; | ||
60 : | *) | ||
61 : | ARGS="$ARGS $arg" | ||
62 : | ;; | ||
63 : | esac | ||
64 : | done | ||
65 : | |||
66 : | if [ "$HEAP_IMAGE" = "" ]; then | ||
67 : | HEAP_IMAGE="$ROOT" | ||
68 : | fi | ||
69 : | |||
70 : | $SML $ARGS <<ZZZ | ||
71 : | use "lexgen.sml"; | ||
72 : | use "export-lex.sml"; | ||
73 : | export "$HEAP_IMAGE" : unit; | ||
74 : | ZZZ | ||
75 : |
root@smlnj-gforge.cs.uchicago.edu | ViewVC Help |
Powered by ViewVC 1.0.0 |