Debian Codegraph @

lib/mllpt-lib/ml-lpt/ml-antlr/build.sh

raw symbols SCIP
1 #!/bin/sh
2 #
3 # Copyright (c) 2018 The Fellowship of SML/NJ (https://smlnj.org)
4 #
5 # build script for ml-antlr
6 #
7 # options:
8 # -o image -- specify the name of the heap image, "ml-antlr"
9 # is the default.
10
11 CMD=$0
12
13 ROOT="ml-antlr"
14 HEAP_IMAGE=""
15 SMLNJROOT=`pwd`/../..
16 BIN=${INSTALLDIR:-$SMLNJROOT}/bin
17 BUILD=$BIN/ml-build
18 SIZE_OPT="-32"
19
20 #
21 # process command-line options
22 #
23 while [ "$#" != "0" ] ; do
24 arg=$1
25 shift
26 case $arg in
27 -32) SIZE_OPT=$arg ;;
28 -64) SIZE_OPT=$arg ;;
29 -o)
30 if [ "$#" = "0" ]; then
31 echo "$CMD: must supply image name for -o option"
32 exit 1
33 fi
34 HEAP_IMAGE=$1; shift
35 ;;
36 *)
37 echo $CMD: invalid argument: $arg
38 exit 1
39 ;;
40 esac
41 done
42
43 if [ "$HEAP_IMAGE" = "" ]; then
44 HEAP_IMAGE="$ROOT"
45 fi
46
47 #
48 # Build the ml-antlr standalone program:
49 "$BUILD" $SIZE_OPT -DNO_ML_ULEX -DNO_ML_ANTLR sources.cm Main.main $HEAP_IMAGE
50
51 exit 0