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/trunk/build.sh
ViewVC logotype

Diff of /ml-lex/trunk/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 sml/trunk/src/ml-lex/build revision 569, Tue Mar 7 04:01:07 2000 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"  TWOUP=`pwd`/../../
14  BIN="../../bin"  BIN=${INSTALLDIR:-$TWOUP}/bin
15  SML="$BIN/sml"  BUILD=$BIN/ml-build
   
 #  
 # 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  
16    
17  #  #
18  # process command-line options  # process command-line options
19  #  #
20  ARGS=""  while [ "$#" != "0" ] ; do
 while [ "$#" != "0" ]  
 do  
21      arg=$1      arg=$1
22      shift      shift
23      case $arg in      case $arg in
         -arch)  
             if [ "$#" = "0" ]; then  
                 echo "$CMD: must supply architecture for -arch option"  
                 exit 1  
             fi  
             ARCH=$1; shift  
         ;;  
24          -o)          -o)
25              if [ "$#" = "0" ]; then              if [ "$#" = "0" ]; then
26                  echo "$CMD: must supply image name for -o option"                  echo "$CMD: must supply image name for -o option"
# Line 50  Line 28 
28              fi              fi
29              HEAP_IMAGE=$1; shift              HEAP_IMAGE=$1; shift
30          ;;          ;;
         -sml)  
             if [ "$#" = "0" ]; then  
                 echo "$CMD: must supply path for -sml option"  
                 exit 1  
             fi  
             SML=$1; shift  
         ;;  
31          *)          *)
32              ARGS="$ARGS $arg"              echo $CMD: invalid argument: $arg
33                exit 1
34          ;;          ;;
35      esac      esac
36  done  done
# Line 67  Line 39 
39      HEAP_IMAGE="$ROOT"      HEAP_IMAGE="$ROOT"
40  fi  fi
41    
42  $SML $ARGS <<ZZZ  $BUILD ml-lex.cm ExportLexGen.lexGen $HEAP_IMAGE
   use "lexgen.sml";  
   use "export-lex.sml";  
   export "$HEAP_IMAGE" : unit;  
 ZZZ  
43    

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

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