Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /ml-lex/releases/release-110.84.1/build.sh
ViewVC logotype

Diff of /ml-lex/releases/release-110.84.1/build.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

sml/branches/SMLNJ/src/ml-lex/build revision 249, Sat Apr 17 18:57:03 1999 UTC ml-lex/trunk/build revision 2286, Wed Jan 31 00:16:13 2007 UTC
# Line 3  Line 3 
3  # build script for ml-lex under the new runtime system.  # build script for ml-lex under the new runtime system.
4  #  #
5  # options:  # options:
6  #   -arch arch          -- specify the architecture, "heap" is the default.  #   -o image            -- specify the name of the heap image, "ml-lex"
 #   -o image            -- specify the name of the heap image, "ml-lex.ARCH"  
 #                          is the default.  
 #   -sml path           -- specify the path to the sml executable, "../../bin/sml"  
7  #                          is the default.  #                          is the default.
8    
9  CMD="build"  CMD=$0
10    
11  ROOT="ml-lex"  ROOT="ml-lex"
12  HEAP_IMAGE=""  HEAP_IMAGE=""
13  ARCH="heap"  SMLNJROOT=`pwd`/..
14  BIN="../../bin"  BIN=${INSTALLDIR:-$SMLNJROOT}/bin
15  SML="$BIN/sml"  LIB=${INSTALLDIR:-$SMLNJROOT}/lib
16    BUILD=$BIN/ml-build
17  #  SML=$BIN/sml
 # determine the host architecture  
 #  
 ARCH_N_OPSYS=`$BIN/.arch-n-opsys`  
 if [ $? != "0" ]; then  
   echo "$CMD: unable to determine architecture/operating system"  
   exit 1  
 fi  
 eval $ARCH_N_OPSYS  
18    
19  #  #
20  # process command-line options  # process command-line options
21  #  #
22  ARGS=""  while [ "$#" != "0" ] ; do
 while [ "$#" != "0" ]  
 do  
23      arg=$1      arg=$1
24      shift      shift
25      case $arg in      case $arg in
         -arch)  
             if [ "$#" = "0" ]; then  
                 echo "$CMD: must supply architecture for -arch option"  
                 exit 1  
             fi  
             ARCH=$1; shift  
         ;;  
26          -o)          -o)
27              if [ "$#" = "0" ]; then              if [ "$#" = "0" ]; then
28                  echo "$CMD: must supply image name for -o option"                  echo "$CMD: must supply image name for -o option"
# Line 50  Line 30 
30              fi              fi
31              HEAP_IMAGE=$1; shift              HEAP_IMAGE=$1; shift
32          ;;          ;;
         -sml)  
             if [ "$#" = "0" ]; then  
                 echo "$CMD: must supply path for -sml option"  
                 exit 1  
             fi  
             SML=$1; shift  
         ;;  
33          *)          *)
34              ARGS="$ARGS $arg"              echo $CMD: invalid argument: $arg
35                exit 1
36          ;;          ;;
37      esac      esac
38  done  done
# Line 67  Line 41 
41      HEAP_IMAGE="$ROOT"      HEAP_IMAGE="$ROOT"
42  fi  fi
43    
44  $SML $ARGS <<ZZZ  "$BUILD" ml-lex.cm ExportLexGen.lexGen $HEAP_IMAGE
45    use "lexgen.sml";  
46    use "export-lex.sml";  #
47    export "$HEAP_IMAGE" : unit;  # Install CM support for ml-lex:
48  ZZZ  "$SML" -m \$smlnj/library-install.cm tool/mllex-tool.cm ${LIB}
49    "$SML" -m \$smlnj/library-install.cm tool/lex-ext.cm ${LIB}
50    
51    exit 0

Legend:
Removed from v.249  
changed lines
  Added in v.2286

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0