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 /config/releases/release-110.72/install.sh
ViewVC logotype

Diff of /config/releases/release-110.72/install.sh

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

revision 537, Fri Feb 18 17:20:16 2000 UTC revision 1385, Fri Sep 19 20:55:21 2003 UTC
# Line 1  Line 1 
1  #!/bin/sh  #!/bin/sh
2  #  #
3  # Copyright (c) 1994 AT&T Bell Laboratories.  # Copyright (c) 1994 AT&T Bell Laboratories.
4    # Copyright (c) 2003 The Fellowship of SML/NJ
5  #  #
6  # Installation script for SML/NJ and related tools; this is a temporary  # Installation script for SML/NJ and related tools; this is a temporary
7  # placeholder until the configuration tool is finished.  # placeholder until the configuration tool is finished.
8  #  #
9  # Significant changes to accommodate (and take advantage of) the new CM  # Significant changes to take advantage of a new portable installer
10  # by M.Blume (2/2000).  # script for everything after booting the interactive system.
11  #  #
12    # Author: Matthias Blume (blume@tti-c.org)
 #  
 # get the target list  
13  #  #
14  if [ ! -r config/targets ]; then  
15      echo "!!! File config/targets is missing."  if [ x${INSTALL_QUIETLY} = xtrue ] ; then
16      exit 1      export CM_VERBOSE=false
17  fi  fi
18  . config/targets  
19    vsay() {
20        if [ x${INSTALL_DEBUG} = xtrue ] ; then
21            echo "$@"
22        elif [ x${INSTALL_QUIETLY} = xtrue ] ; then
23            :
24        else
25            echo "$@"
26        fi
27    }
28    
29    complain() {
30        echo "$@"
31        exit 1
32    }
33    
34    this=$0
35    
36    
37  #  #
38  # create the preloads.standard file  # create the preloads.standard file
39  #  #
40  if [ ! -r config/preloads ]; then  if [ ! -r config/preloads ]; then
41      echo "!!! File config/preloads is missing."      complain "$this: !!! File config/preloads is missing."
     exit 1  
42  fi  fi
43  cp config/preloads preloads.standard  cp config/preloads preloads.standard
44    
# Line 34  Line 49 
49  MAKE=make  MAKE=make
50    
51  SHELL=/bin/sh  SHELL=/bin/sh
52  echo Using shell $SHELL.  vsay $this: Using shell $SHELL.
53    
54  #  #
55  # set the SML root directory  # set the SML root directory
56  #  #
57  REAL_PWD=`pwd`  REAL_PWD=`pwd`
58  ROOT=${PWD:-$REAL_PWD}  ROOT=${PWD:-$REAL_PWD}
59  echo SML root is $ROOT.  vsay $this: SML root is $ROOT.
60  echo Installation directory is ${INSTALLDIR:=$ROOT}.  vsay $this: Installation directory is ${INSTALLDIR:=$ROOT}.
61    
62  #  #
63  # set the various directory and file pathname variables  # set the various directory and file pathname variables
# Line 53  Line 68 
68  RUNDIR=$BINDIR/.run             # where executables (i.e., the RTS) live  RUNDIR=$BINDIR/.run             # where executables (i.e., the RTS) live
69  SRCDIR=$ROOT/src                # where the source tree is rooted  SRCDIR=$ROOT/src                # where the source tree is rooted
70  LIBDIR=$INSTALLDIR/lib          # where libraries live  LIBDIR=$INSTALLDIR/lib          # where libraries live
 LIBLIST=$ROOT/liblist           # list of commands to stabilize libraries  
 LIBMOVESCRIPT=$ROOT/libmove     # a temporary script  
 LOCALPATHCONFIG=$INSTALLDIR/pathconfig # a temporary pathconfig file  
71    
72  #  #
73  # the path to the dir where ml-yacc, ml-burg, ml-lex, and ml-build live  # files to be deleted after we are done...
74    #
75    tmpfiles=""
76    tmpfiles="$tmpfiles $ROOT/preloads.standard"
77    #
78    # make sure we always clean up after ourselves...
79  #  #
80  TOOLDIR=$BINDIR  trap 'rm -f $tmpfiles' 0 1 2 3 15
81    
82    
83  #  #
84  # set the CM configuration variables (these are environment variables  # set the CM configuration variables (these are environment variables
85  # that will be queried by the bootstrap code)  # that will be queried by the bootstrap code)
86  # Especially important is CM_PATHCONFIG_DEFAULT.  # Especially important is CM_PATHCONFIG.
87  #  #
88  CM_PATHCONFIG_DEFAULT=$LIBDIR/pathconfig  CM_PATHCONFIG=$LIBDIR/pathconfig
89  export CM_PATHCONFIG_DEFAULT  export CM_PATHCONFIG
90    
91  #  #
92  # the release version that we are installing  # the release version that we are installing
93  #  #
94  VERSION=`cat $CONFIGDIR/version`  VERSION=`cat $CONFIGDIR/version`
95  echo Installing version $VERSION.  vsay $this: Installing version $VERSION.
96    
97  #  #
98  # Function to make a directory (and advertise such action).  # the URL for the (usually remote) source archive
99    #
100    SRCARCHIVEURL=`cat $CONFIGDIR/srcarchiveurl`
101    vsay $this: URL of source archive is $SRCARCHIVEURL.
102    
103    #
104    # Function to make a directory including its ancestors.
105  #  #
106  makedir() {  makedir() {
107      if [ ! -d $1 ] ; then      if [ x$1 = x ] ; then
108          echo Making directory $1          :
109        elif [ -d $1 ] ; then
110            :
111        else
112            makedir `dirname $1`
113            if [ x${INSTALL_VERBOSE} = xtrue ] ; then
114                vsay "$this: Making directory $1"
115            fi
116          if mkdir $1 ; then          if mkdir $1 ; then
117              : everything is fine              :
118          else          else
119              echo "!!! Unable to make directory $1!"              complain "$this: !!! Unable to make directory $1!"
             exit 1  
120          fi          fi
121      fi      fi
122  }  }
123    
124  #  #
125  # Function to unpack a source archive.  # Fish out the CM metadata directory name from library files
126  #  # and store it in ORIG_CM_DIR_ARC.
127  # $1: descriptive name of the sources to be unpacked  # The single argument is the name of the directory containing
128  # $2: the directory into which to unpack the sources  # a single subdirectory which is a CM metadata directory:
129  # $3: the sub-directory of $2 that is going to be created by unpacking  #
130  # $4: the basename of the source archive (the script will check several  fish() {
131  #     different suffixes to determine what kind of de-compression is to      cd $1
132  #     be used)      ORIG_CM_DIR_ARC=unknown
133  unpack() {      for i in * .[a-zA-Z0-9]* ; do
134      if [ -d $2/$3 ]; then          if [ -d $i ] ; then
135          echo "The $1 source tree already exists."              ORIG_CM_DIR_ARC=$i
136      else              break
         echo "Unpacking $1 source archive."  
         cd $2  
         if [ -r $4.tar.Z ] ; then  
             zcat $4.tar.Z | tar -xf -  
         elif [ -r $4.tar ] ; then  
             tar -xf $4.tar  
         elif [ -r $4.tar.gz ] ; then  
             gunzip -c $4.tar.gz | tar -xf -  
         elif [ -r $4.tar.bz2 ] ; then  
             bunzip2 -c $4.tar.bz2 | tar -xf -  
         elif [ -r $4.tgz ] ; then  
             gunzip -c $4.tgz | tar -xf -  
         elif [ -r $4.tz ] ; then  
             zcat $4.tz | tar -xf -  
         else  
             echo "!!! The $1 source archive is missing."  
             exit 1  
         fi  
         if [ ! -d $2/$3 ]; then  
             echo "!!! Unable to unpack $1 source archive."  
             exit 1  
137          fi          fi
138        done
139        if [ $ORIG_CM_DIR_ARC = unknown ] ; then
140            complain "$this: could not determine CM metadata directory name"
141        else
142            echo "$this: CM metadata directory name is \"${ORIG_CM_DIR_ARC}\""
143      fi      fi
144  }  }
145    
 #  
 # Move the stable archive of a library whose description file was $1/$2 to  
 # $LIBDIR/$2/CM/$ARCH-unix/$2 so that it appears as if the description file  
 # had been at $LIBDIR/$2/$2  
 #  
 # (This script will also move all other libraries that show up in  
 #  $1/CM/$ARCH-unix because in the case of the boot directory this indicates  
 #  that some library did not have its own path anchor but was specified  
 #  relative to $1/$2. Still, don't rely on this to be robust -- rather make  
 #  separate anchors for every library!)  
 #  
 movelibs() {  
     for lib in `/bin/ls $1/CM/$ARCH-unix` ; do  
         case $lib in  
         *.cm | *.cmi)  
             if [ $lib != $2 ] ; then  
                 echo "! Warning:" $lib specified relative to $2  
             fi  
             echo Moving library $lib to $LIBDIR  
             makedir $LIBDIR/$2  
             makedir $LIBDIR/$2/CM  
             makedir $LIBDIR/$2/CM/$ARCH-unix  
             mv $1/CM/$ARCH-unix/$lib $LIBDIR/$2/CM/$ARCH-unix/$lib  
             ;;  
         *)  
             ;;  
         esac  
      done  
 }  
146    
147  # A shell function that registers a library for being built.  # A function to move all stable library files to a parallel directory
148  # This function takes two arguments: 1. a name under which the library  # hierarchy.
149  # is to be known later (something.cm) and 2. the path relative to $SRCDIR  # The first argument must be a simple path (no / inside), and
150  # that leads to the library's .cm file.  The library's .cm file must be the  # the second argument must be an absolute path.
151  # same as $1.  move() {
152  #      if [ -L $1 ] ; then
153  # This works by adding ML code to file $LIBLIST.  The code in this file          rm -f $1             # remove symbolic link made by diracs (see below)
154  # will be executed near the end of this script.  If $MOVE_LIBRARIES is      elif [ -d $1 ] ; then
155  # set to true, then reglib will also register a "movelibs" to be executed at          if [ ! -d $2 ] ; then
156  # the end by putting a "movelibs" line into $LIBMOVESCRIPT.              if [ -f $2 ] ; then
157                    complain $this: $2 exists as a non-directory.
158  reglib() {              fi
159      if [ x$MOVE_LIBRARIES = xtrue ] ; then              mkdir $2
160          FINALLOCATION=$LIBDIR/$1          fi
161      else          cd $1
162          FINALLOCATION=$SRCDIR/$2          for i in * .[a-zA-Z0-9]* ; do
163      fi              move $i $2/$i
164      if [ -d $FINALLOCATION/CM/$ARCH-unix ] ; then          done
165          echo "Library $1 already exists in $FINALLOCATION."          cd ..
166      else      elif [ -f $1 ] ; then
167          echo "Scheduling library $1 to be built in $FINALLOCATION."          rm -f $2
168          echo "andalso CM.stabilize false \"$1\"" >>$LIBLIST          mv $1 $2
         echo $1 $SRCDIR/$2 >>$LOCALPATHCONFIG  
         if [ x$MOVE_LIBRARIES = xtrue ] ; then  
             echo movelibs $SRCDIR/$2 $1 >>$LIBMOVESCRIPT  
         fi  
         echo $1 $FINALLOCATION >>$CM_PATHCONFIG_DEFAULT  
169      fi      fi
170  }  }
171    
172  #  #
173  # Function to build a standalone program such as ml-yacc.  The function takes  # Traverse the directory tree rooted at $3 (must be single arc!).
174  # 2 or 3 arguments.  First the name of the program which at the same time  # Find all directories named $1, rename them into $2 and make
175  # is the directory name under $SRCDIR where the sources reside.  The second  # and establish $1 as a symbolic link to $2:
176  # argument is a descriptive name for the program (passed on to "unpack").  #
177  # The optional third argument specifies the path relative to $SRCDIR/$1  dirarcs() {
178  # of the directory where the program's heap image is to be found.      if [ -d $3 ] ; then
179  #          if [ $3 = $1 ] ; then
180                mv $1 $2
181  standalone() {              ln -s $2 $1
182      TARGET=$1.$HEAP_SUFFIX          else
183      if [ $# = 3 ] ; then              cd $3
184          TARGETLOC=$3/$TARGET              for d in * .[a-zA-Z0-9]* ; do
185      else                  dirarcs $1 $2 $d
186          TARGETLOC=$TARGET              done
187      fi              cd ..
     if [ -r $HEAPDIR/$TARGET ] ; then  
         echo Target $TARGET already exists.  
     else  
         echo Building $TARGET.  
         unpack $2 $SRCDIR $1 $ROOT/$VERSION-$1  
         cd $SRCDIR/$1  
         ./build  
         if [ -r $TARGETLOC ] ; then  
             mv $TARGETLOC $HEAPDIR/$TARGET  
             if [ ! -f $BINDIR/$1 ] ; then  
                 cd $BINDIR  
                 ln -s .run-sml $1  
             fi  
         else  
             echo "!!! Build of $TARGET failed."  
188          fi          fi
189      fi      fi
190  }  }
191    
192    
193    ######################################################################
194    
195  #  #
196  # create the various sub directories  # create the various sub directories
197  #  #
198  for dir in $BINDIR $HEAPDIR $RUNDIR $LIBDIR $SRCDIR  for dir in $BINDIR $HEAPDIR $RUNDIR $LIBDIR $SRCDIR ; do
 do  
199      makedir $dir      makedir $dir
200  done  done
201    
202  #  #
 # install the script that tests the architecture, and make sure that it works  
 #  
 if [ -x $BINDIR/.arch-n-opsys ]; then  
     echo Script $BINDIR/.arch-n-opsys already exists.  
 else  
     cat $CONFIGDIR/_arch-n-opsys \  
     | sed -e "s,@SHELL@,$SHELL,g" > $BINDIR/.arch-n-opsys  
     chmod 555 $BINDIR/.arch-n-opsys  
     if [ ! -x $BINDIR/.arch-n-opsys ]; then  
         echo "!!! Installation of $BINDIR/.arch-n-opsys failed."  
         exit 1  
     fi  
 fi  
   
 ARCH_N_OPSYS=`$BINDIR/.arch-n-opsys`  
 if [ "$?" != "0" ]; then  
     echo "!!! Script $BINDIR/.arch-n-opsys fails on this machine."  
     echo "!!! You must patch this by hand and repeat the installation."  
     exit 2  
 else  
     echo Script $BINDIR/.arch-n-opsys reports $ARCH_N_OPSYS.  
 fi  
 eval $ARCH_N_OPSYS  
   
 #  
203  # Function to install a "driver" script...  # Function to install a "driver" script...
204  #   This takes care of patching the source of the script with the SHELL,  #   This takes care of patching the source of the script with the SHELL,
205  #   BINDIR, and VERSION variables to use.  #   BINDIR, and VERSION variables to use.
# Line 265  Line 207 
207  installdriver() {  installdriver() {
208      dsrc=$1      dsrc=$1
209      ddst=$2      ddst=$2
210      if [ -x $BINDIR/$ddst ]; then  # We install the driver unconditionally. (It would be better to test
211          echo Script $BINDIR/$ddst already exists.  # for an outdated driver script, but not all "test" commands understand
212      else  # the -nt comparison operator....)
213    #   if [ -x $BINDIR/$ddst ]; then
214    #       echo $this: Script $BINDIR/$ddst already exists.
215    #   else
216            rm -f $BINDIR/$ddst
217          cat $CONFIGDIR/$dsrc | \          cat $CONFIGDIR/$dsrc | \
218          sed -e "s,@SHELL@,$SHELL,g" \          sed -e "s,@SHELL@,$SHELL,g" \
219              -e "s,@BINDIR@,$BINDIR," \              -e "s,@BINDIR@,$BINDIR," \
# Line 275  Line 221 
221              > $BINDIR/$ddst              > $BINDIR/$ddst
222          chmod 555 $BINDIR/$ddst          chmod 555 $BINDIR/$ddst
223          if [ ! -x $BINDIR/$ddst ]; then          if [ ! -x $BINDIR/$ddst ]; then
224              echo "!!! Installation of $BINDIR/${ddst} failed."              complain "$this: !!! Installation of $BINDIR/${ddst} failed."
             exit 1  
         fi  
225      fi      fi
226    #   fi
227  }  }
228    
229    #
230    # install the script that tests architecture and os...
231    #
232    installdriver _arch-n-opsys .arch-n-opsys
233    
234    #
235    # run it to figure out what architecture and os we are using, define
236    # corresponding variables...
237    #
238    ARCH_N_OPSYS=`$BINDIR/.arch-n-opsys`
239    if [ "$?" != "0" ]; then
240        echo "$this: !!! Script $BINDIR/.arch-n-opsys fails on this machine."
241        echo "$this: !!! You must patch this by hand and repeat the installation."
242        exit 2
243    else
244        vsay $this: Script $BINDIR/.arch-n-opsys reports $ARCH_N_OPSYS.
245    fi
246    eval $ARCH_N_OPSYS
247    
248    #
249    # now install all the other driver scripts...
250    #
251  installdriver _run-sml .run-sml  installdriver _run-sml .run-sml
252  installdriver _link-sml .link-sml  installdriver _link-sml .link-sml
253  installdriver _ml-build ml-build  installdriver _ml-build ml-build
254    installdriver _ml-makedepend ml-makedepend
255    
256  #  #
257  # set some architecture dependent run-time system flags  # set some architecture dependent run-time system flags
# Line 293  Line 261 
261          ALLOC=1M          ALLOC=1M
262          ;;          ;;
263      x86)      x86)
264            # The following is the _wrong_ value for many popular x86 chips
265            # (i.e., Celerons).  However, the optimal value for those is 32k,
266            # and such a small value is not enough for the runtime system's boot
267            # code.  Therefore, we use 256k here and re-set it to the proper
268            # value in .run-sml.
269          ALLOC=256k          ALLOC=256k
270          ;;          ;;
271      alpha32)      alpha32)
# Line 310  Line 283 
283      linux)      linux)
284          EXTRA_DEFS=`$CONFIGDIR/chk-global-names.sh`          EXTRA_DEFS=`$CONFIGDIR/chk-global-names.sh`
285          if [ "$?" != "0" ]; then          if [ "$?" != "0" ]; then
286              echo "!!! Problems checking for underscores in global names."              complain "$this: !!! Problems checking for underscores in asm names."
             exit 1  
287          fi          fi
288          EXTRA_DEFS="XDEFS=$EXTRA_DEFS"          EXTRA_DEFS="XDEFS=$EXTRA_DEFS"
289          ;;          ;;
# Line 320  Line 292 
292  #  #
293  # the name of the bin files directory  # the name of the bin files directory
294  #  #
295  BOOT_FILES=sml.boot.$ARCH-unix  BOOT_ARCHIVE=boot.$ARCH-unix
296    BOOT_FILES=sml.$BOOT_ARCHIVE
 #  
 # files to be deleted after we are done...  
 #  
 tmpfiles=""  
 tmpfiles="$tmpfiles $ROOT/preloads.standard"  
 tmpfiles="$tmpfiles $ROOT/$LIBLIST"  
 tmpfiles="$tmpfiles $ROOT/$LOCALPATHCONFIG"  
 tmpfiles="$tmpfiles $ROOT/$LIBMOVESCRIPT"  
 #  
 # also remove the boot dir because it won't have anything interesting in  
 # it after we are successful...  
 #  
 tmpfiles="$tmpfiles $ROOT/$BOOT_FILES"  
 #  
 # make sure we always clean up after ourselves...  
 #  
 trap 'rm -rf $tmpfiles' 0 1 2 3 15  
297    
298  #  #
299  # build the run-time system  # build the run-time system
300  #  #
 unpack "run-time" $SRCDIR runtime $ROOT/$VERSION-runtime  
301  if [ -x $RUNDIR/run.$ARCH-$OPSYS ]; then  if [ -x $RUNDIR/run.$ARCH-$OPSYS ]; then
302      echo Run-time system already exists.      vsay $this: Run-time system already exists.
303  else  else
304        $CONFIGDIR/unpack $ROOT runtime
305      cd $SRCDIR/runtime/objs      cd $SRCDIR/runtime/objs
306      echo Compiling the run-time system.      echo $this: Compiling the run-time system.
307      $MAKE -f mk.$ARCH-$OPSYS $EXTRA_DEFS      $MAKE -f mk.$ARCH-$OPSYS $EXTRA_DEFS
308      if [ -x run.$ARCH-$OPSYS ]; then      if [ -x run.$ARCH-$OPSYS ]; then
309          mv run.$ARCH-$OPSYS $RUNDIR          mv run.$ARCH-$OPSYS $RUNDIR
310          # $MAKE MAKE=$MAKE clean          $MAKE MAKE=$MAKE clean
311      else      else
312          echo "!!! Run-time system build failed for some reason."          complain "$this: !!! Run-time system build failed for some reason."
         exit 1  
313      fi      fi
314  fi  fi
315  cd $SRCDIR  cd $SRCDIR
# Line 364  Line 318 
318  # boot the base SML system  # boot the base SML system
319  #  #
320  if [ -r $HEAPDIR/sml.$HEAP_SUFFIX ]; then  if [ -r $HEAPDIR/sml.$HEAP_SUFFIX ]; then
321      echo Heap image $HEAPDIR/sml.$HEAP_SUFFIX already exists.      vsay $this: Heap image $HEAPDIR/sml.$HEAP_SUFFIX already exists.
322        fish $LIBDIR/basis.cm
323        # ignore requested arc name since we have to live with what is there:
324        export CM_DIR_ARC=$ORIG_CM_DIR_ARC
325  else  else
326      unpack bin $ROOT $BOOT_FILES $ROOT/$VERSION-$BOOT_FILES      $CONFIGDIR/unpack $ROOT $BOOT_ARCHIVE
327    
328        fish $ROOT/$BOOT_FILES/basis.cm
329    
330        cd $ROOT
331    
332        # Target arc:
333        export CM_DIR_ARC=${CM_DIR_ARC:-".cm"}
334    
335        if [ $CM_DIR_ARC = $ORIG_CM_DIR_ARC ] ; then
336            : we are happy
337        else
338            # now we have to make a symbolic link for each occurrence of
339            # $ORIG_CM_DIR_ARC to $CM_DIR_ARC
340            dirarcs ${ORIG_CM_DIR_ARC} ${CM_DIR_ARC} $BOOT_FILES
341        fi
342    
343      cd $ROOT/$BOOT_FILES      cd $ROOT/$BOOT_FILES
344    
345        # now link (boot) the system and let it initialize itself...
346      if $BINDIR/.link-sml @SMLheap=$ROOT/sml @SMLboot=BOOTLIST @SMLalloc=$ALLOC      if $BINDIR/.link-sml @SMLheap=$ROOT/sml @SMLboot=BOOTLIST @SMLalloc=$ALLOC
347      then      then
348          cd $ROOT          cd $ROOT
# Line 380  Line 355 
355              # the pathconfig file.              # the pathconfig file.
356              #              #
357              cd $ROOT/$BOOT_FILES              cd $ROOT/$BOOT_FILES
358              for lib in *.cm ; do              for anchor in * ; do
359                  echo $lib $LIBDIR/$lib >>$CM_PATHCONFIG_DEFAULT                  if [ -d $anchor ] ; then
360                  movelibs $ROOT/$BOOT_FILES/$lib $lib                      echo $anchor $anchor >>$CM_PATHCONFIG
361                        move $anchor $LIBDIR/$anchor
362                    fi
363              done              done
364              cd $ROOT              cd $ROOT
365              # rm -rf $BOOT_FILES              # $BOOT_FILES is now only an empty skeleton, let's get rid of it.
366                rm -rf $BOOT_FILES
367    
368          else          else
369              echo "!!! Boot code did not produce heap image (sml.$HEAP_SUFFIX)."              complain "$this !!! No heap image generated (sml.$HEAP_SUFFIX)."
             exit 1  
370          fi          fi
371      else      else
372          echo "!!! Boot code failed, no heap image built (sml.$HEAP_SUFFIX)."          complain "$this !!! Boot code failed, no heap image (sml.$HEAP_SUFFIX)."
         exit 1  
373      fi      fi
374  fi  fi
375    
 #  
 # Initialize $LIBLIST  
 #  
376  cd $ROOT  cd $ROOT
 rm -f $LOCALPATHCONFIG $LIBLIST  
 echo 'OS.Process.exit (if true' >$LIBLIST  
377    
378  #  #
379  # now build (or prepare to build) the individual targets  # Now do all the rest using the libinstall.sml script:
380  #  #
381  cd $SRCDIR  echo $this: Installing other libraries and programs:
382  echo Installing other targets.  if $BINDIR/sml $CONFIGDIR/libinstall.sml <<EOF
383  for i in $TARGETS ; do  LibInstall.proc { smlnjroot = "${ROOT}",
384      case $i in                    buildcmd = "CM_LOCAL_PATHCONFIG=/dev/null ./build",
385        src-smlnj)                    unpackcmd = SOME "$CONFIGDIR/unpack",
386          for src in compiler cm MLRISC smlnj-lib ml-yacc system                    instcmd = fn target => let
387          do                                val new = "$BINDIR/" ^ target
388              unpack $src $ROOT/src $src $ROOT/$VERSION-$src                              in
389          done                                 if OS.FileSys.access (new, []) then ()
390          ;;                                 else
391        ml-yacc)                                   Posix.FileSys.symlink
392          standalone ml-yacc ML-Yacc src                                      { old = "$BINDIR/.run-sml",
393          echo ml-yacc $TOOLDIR >>$CM_PATHCONFIG_DEFAULT                                        new = new }
394          ;;                               end }
395        ml-lex)  EOF
396          standalone ml-lex ML-Lex  then
397          echo ml-lex $TOOLDIR >>$CM_PATHCONFIG_DEFAULT      vsay $this: Installation complete.
         ;;  
       ml-burg)  
         standalone ml-burg ML-Burg  
         echo ml-burg $TOOLDIR >>$CM_PATHCONFIG_DEFAULT  
         ;;  
       smlnj-lib)  
         unpack "SML/NJ Library" $SRCDIR smlnj-lib $ROOT/$VERSION-smlnj-lib  
   
         # Don't make the Util library -- it came pre-made and has been  
         # installed when making the base system.  In other words, don't do...  
             #reglib smlnj-lib.cm smlnj-lib/Util  
         # ... and don't make the HTML library ...  
             #reglib html-lib.cm smlnj-lib/HTML  
         # ... and don't make the PP library ...  
             #reglib pp-lib.cm smlnj-lib/PP  
         # make the Unix library  
             reglib unix-lib.cm smlnj-lib/Unix  
         # make the INet library  
             reglib inet-lib.cm smlnj-lib/INet  
         # make the RegExp library  
             reglib regexp-lib.cm smlnj-lib/RegExp  
         # make the Reactive library  
             reglib reactive-lib.cm smlnj-lib/Reactive  
         ;;  
       cml)  
         unpack CML $SRCDIR cml $ROOT/$VERSION-cml  
         reglib core-cml.cm cml/src/core-cml  
         reglib cml.cm cml/src  
         reglib cml-basis.cm cml  
         ;;  
       cml-lib)  
         unpack CML $SRCDIR cml $ROOT/$VERSION-cml  
         reglib cml-lib.cm cml/cml-lib  
         ;;  
       eXene)  
         unpack EXene $SRCDIR eXene $ROOT/$VERSION-eXene  
         reglib eXene.cm eXene  
         ;;  
       doc)  
         unpack Doc $ROOT doc $ROOT/$VERSION-doc  
         cd $ROOT/doc  
         build $ROOT  
         ;;  
       *)  
         echo "!!! Unknown target $i."  
         ;;  
     esac  
 done  
   
 #  
 # Now go and stabilize all registered libraries...  
 # This is done with library sources in their original locations inside  
 # $SRCDIR, so we must consult $LOCALPATHCONFIG.  
 #  
   
 echo Compiling library code.  
 echo 'then OS.Process.success else OS.Process.failure);' >>$LIBLIST  
 if CM_LOCAL_PATHCONFIG=$LOCALPATHCONFIG $BINDIR/sml <$LIBLIST ; then  
     echo Libraries compiled successfully.  
398  else  else
399      echo "!!! Something went wrong when compiling the libraries."      complain "$this: !!! Installation of libraries and programs failed."
     exit 1  
 fi  
   
 #  
 # Finally, move the libraries to their final locations...  
 #  
   
 if [ -r $LIBMOVESCRIPT ] ; then  
     echo Moving libraries to $LIBDIR.  
     . $LIBMOVESCRIPT  
400  fi  fi
401    
402  exit 0  exit 0

Legend:
Removed from v.537  
changed lines
  Added in v.1385

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