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 /sml/trunk/config/install.sh
ViewVC logotype

Diff of /sml/trunk/config/install.sh

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

revision 569, Tue Mar 7 04:01:07 2000 UTC revision 1672, Thu Oct 28 15:44:02 2004 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
17        CM_VERBOSE=false
18  fi  fi
19  . config/targets  
20    vsay() {
21        if [ x${INSTALL_DEBUG} = xtrue ] ; then
22            echo "$@"
23        elif [ x${INSTALL_QUIETLY} = xtrue ] ; then
24            :
25        else
26            echo "$@"
27        fi
28    }
29    
30    complain() {
31        echo "$@"
32        exit 1
33    }
34    
35    this=$0
36    
37    
38  #  #
39  # create the preloads.standard file  # create the preloads.standard file
40  #  #
41  if [ ! -r config/preloads ]; then  if [ ! -r config/preloads ]; then
42      echo "!!! File config/preloads is missing."      complain "$this: !!! File config/preloads is missing."
     exit 1  
43  fi  fi
44  cp config/preloads preloads.standard  cp config/preloads preloads.standard
45    
# Line 34  Line 50 
50  MAKE=make  MAKE=make
51    
52  SHELL=/bin/sh  SHELL=/bin/sh
53  echo Using shell $SHELL.  vsay $this: Using shell $SHELL.
54    
55  #  #
56  # set the SML root directory  # set the SML root directory
57  #  #
58  REAL_PWD=`pwd`  REAL_PWD=`pwd`
59  ROOT=${PWD:-$REAL_PWD}  ROOT=${PWD:-$REAL_PWD}
60  echo SML root is $ROOT.  vsay $this: SML root is $ROOT.
61  echo Installation directory is ${INSTALLDIR:=$ROOT}.  
62    cd ${INSTALLDIR:=$ROOT}
63    INSTALLDIR=`pwd`
64    cd $ROOT
65    vsay $this: Installation directory is ${INSTALLDIR}.
66    
67  #  #
68  # set the various directory and file pathname variables  # set the various directory and file pathname variables
# Line 53  Line 73 
73  RUNDIR=$BINDIR/.run             # where executables (i.e., the RTS) live  RUNDIR=$BINDIR/.run             # where executables (i.e., the RTS) live
74  SRCDIR=$ROOT/src                # where the source tree is rooted  SRCDIR=$ROOT/src                # where the source tree is rooted
75  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  
   
 #  
 # the path to the dir where ml-yacc, ml-burg, ml-lex, and ml-build live  
 #  
 TOOLDIR=$BINDIR  
76    
77  #  #
78  # files to be deleted after we are done...  # files to be deleted after we are done...
79  #  #
80  tmpfiles=""  tmpfiles=""
81  tmpfiles="$tmpfiles $ROOT/preloads.standard"  tmpfiles="$tmpfiles $ROOT/preloads.standard"
 tmpfiles="$tmpfiles $LIBLIST"  
 tmpfiles="$tmpfiles $LOCALPATHCONFIG"  
 tmpfiles="$tmpfiles $LIBMOVESCRIPT"  
82  #  #
83  # make sure we always clean up after ourselves...  # make sure we always clean up after ourselves...
84  #  #
# Line 79  Line 88 
88  #  #
89  # set the CM configuration variables (these are environment variables  # set the CM configuration variables (these are environment variables
90  # that will be queried by the bootstrap code)  # that will be queried by the bootstrap code)
91  # Especially important is CM_PATHCONFIG_DEFAULT.  # Especially important is CM_PATHCONFIG.
92  #  #
93  CM_PATHCONFIG_DEFAULT=$LIBDIR/pathconfig  export CM_PATHCONFIG
94  export CM_PATHCONFIG_DEFAULT  CM_PATHCONFIG=$LIBDIR/pathconfig
95    
96  #  #
97  # the release version that we are installing  # the release version that we are installing
98  #  #
99  VERSION=`cat $CONFIGDIR/version`  VERSION=`cat $CONFIGDIR/version`
100  echo Installing version $VERSION.  vsay $this: Installing version $VERSION.
101    
102  #  #
103  # Function to make a directory (and advertise such action).  # the URL for the (usually remote) source archive
104    #
105    . $CONFIGDIR/srcarchiveurl
106    vsay $this: URL of source archive is $SRCARCHIVEURL.
107    
108    #
109    # Function to make a directory including its ancestors.
110  #  #
111  makedir() {  makedir() {
112      if [ ! -d $1 ] ; then      if [ x$1 = x ] ; then
113          echo Making directory $1          :
114        elif [ -d $1 ] ; then
115            :
116        else
117            makedir `dirname $1`
118            if [ x${INSTALL_VERBOSE} = xtrue ] ; then
119                vsay "$this: Making directory $1"
120            fi
121          if mkdir $1 ; then          if mkdir $1 ; then
122              : everything is fine              :
123          else          else
124              echo "!!! Unable to make directory $1!"              complain "$this: !!! Unable to make directory $1!"
             exit 1  
125          fi          fi
126      fi      fi
127  }  }
128    
129  #  #
130  # Function to unpack a source archive.  # Fish out the CM metadata directory name from library files
131  #  # and store it in ORIG_CM_DIR_ARC.
132  # $1: descriptive name of the sources to be unpacked  # The single argument is the name of the directory containing
133  # $2: the directory into which to unpack the sources  # a single subdirectory which is a CM metadata directory:
134  # $3: the sub-directory of $2 that is going to be created by unpacking  #
135  # $4: the basename of the source archive (the script will check several  fish() {
136  #     different suffixes to determine what kind of de-compression is to      cd $1
137  #     be used)      ORIG_CM_DIR_ARC=unknown
138  unpack() {      for i in * .[a-zA-Z0-9]* ; do
139      if [ -d $2/$3 ]; then          if [ -d $i ] ; then
140          echo "The $1 source tree already exists."              ORIG_CM_DIR_ARC=$i
141      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  
142          fi          fi
143        done
144        if [ $ORIG_CM_DIR_ARC = unknown ] ; then
145            complain "$this: could not determine CM metadata directory name"
146        else
147            echo "$this: CM metadata directory name is \"${ORIG_CM_DIR_ARC}\""
148      fi      fi
149  }  }
150    
 #  
 # 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  
 }  
151    
152  # A shell function that registers a library for being built.  # A function to move all stable library files to a parallel directory
153  # This function takes two arguments: 1. a name under which the library  # hierarchy.
154  # 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
155  # that leads to the library's .cm file.  The library's .cm file must be the  # the second argument must be an absolute path.
156  # same as $1.  move() {
157  #      if [ -L $1 ] ; then
158  # 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)
159  # will be executed near the end of this script.  If $MOVE_LIBRARIES is      elif [ -d $1 ] ; then
160  # set to true, then reglib will also register a "movelibs" to be executed at          if [ ! -d $2 ] ; then
161  # the end by putting a "movelibs" line into $LIBMOVESCRIPT.              if [ -f $2 ] ; then
162                    complain $this: $2 exists as a non-directory.
163  reglib() {              fi
164      if [ x$MOVE_LIBRARIES = xtrue ] ; then              mkdir $2
165          FINALLOCATION=$LIBDIR/$1          fi
166      else          cd $1
167          FINALLOCATION=$SRCDIR/$2          for i in * .[a-zA-Z0-9]* ; do
168      fi              move $i $2/$i
169      if [ -d $FINALLOCATION/CM/$ARCH-unix ] ; then          done
170          echo "Library $1 already exists in $FINALLOCATION."          cd ..
171      else      elif [ -f $1 ] ; then
172          echo "Scheduling library $1 to be built in $FINALLOCATION."          rm -f $2
173          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  
174      fi      fi
175  }  }
176    
177  #  #
178  # Function to build a standalone program such as ml-yacc.  The function takes  # Traverse the directory tree rooted at $3 (must be single arc!).
179  # 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
180  # is the directory name under $SRCDIR where the sources reside.  The second  # and establish $1 as a symbolic link to $2:
181  # argument is a descriptive name for the program (passed on to "unpack").  #
182  # The optional third argument specifies the path relative to $SRCDIR/$1  dirarcs() {
183  # of the directory where the program's heap image is to be found.      if [ -d $3 ] ; then
184  #          if [ $3 = $1 ] ; then
185                mv $1 $2
186  standalone() {              ln -s $2 $1
187      TARGET=$1.$HEAP_SUFFIX          else
188      if [ $# = 3 ] ; then              cd $3
189          TARGETLOC=$3/$TARGET              for d in * .[a-zA-Z0-9]* ; do
190      else                  dirarcs $1 $2 $d
191          TARGETLOC=$TARGET              done
192      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."  
193          fi          fi
194      fi      fi
195  }  }
196    
197    
198    ######################################################################
199    
200  #  #
201  # create the various sub directories  # create the various sub directories
202  #  #
203  for dir in $BINDIR $HEAPDIR $RUNDIR $LIBDIR $SRCDIR  for dir in $BINDIR $HEAPDIR $RUNDIR $LIBDIR $SRCDIR ; do
 do  
204      makedir $dir      makedir $dir
205  done  done
206    
207  #  #
 # 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  
   
 #  
208  # Function to install a "driver" script...  # Function to install a "driver" script...
209  #   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,
210  #   BINDIR, and VERSION variables to use.  #   BINDIR, and VERSION variables to use.
# Line 283  Line 216 
216  # for an outdated driver script, but not all "test" commands understand  # for an outdated driver script, but not all "test" commands understand
217  # the -nt comparison operator....)  # the -nt comparison operator....)
218  #   if [ -x $BINDIR/$ddst ]; then  #   if [ -x $BINDIR/$ddst ]; then
219  #       echo Script $BINDIR/$ddst already exists.  #       echo $this: Script $BINDIR/$ddst already exists.
220  #   else  #   else
221          rm -f $BINDIR/$ddst          rm -f $BINDIR/$ddst
222          cat $CONFIGDIR/$dsrc | \          cat $CONFIGDIR/$dsrc | \
223          sed -e "s,@SHELL@,$SHELL,g" \          sed -e "s,@SHELL@,$SHELL,g" \
224              -e "s,@BINDIR@,$BINDIR," \              -e "s,@BINDIR@,$BINDIR," \
225              -e "s,@VERSION@,$VERSION," \              -e "s,@VERSION@,$VERSION," \
226                -e "s,@CMDIRARC@,${CM_DIR_ARC:-dummy}," \
227              > $BINDIR/$ddst              > $BINDIR/$ddst
228          chmod 555 $BINDIR/$ddst          chmod 555 $BINDIR/$ddst
229          if [ ! -x $BINDIR/$ddst ]; then          if [ ! -x $BINDIR/$ddst ]; then
230              echo "!!! Installation of $BINDIR/${ddst} failed."              complain "$this: !!! Installation of $BINDIR/${ddst} failed."
             exit 1  
231          fi          fi
232  #   fi  #   fi
233  }  }
234    
235    #
236    # install the script that tests architecture and os...
237    #
238    installdriver _arch-n-opsys .arch-n-opsys
239    
240    #
241    # run it to figure out what architecture and os we are using, define
242    # corresponding variables...
243    #
244    ARCH_N_OPSYS=`$BINDIR/.arch-n-opsys`
245    if [ "$?" != "0" ]; then
246        echo "$this: !!! Script $BINDIR/.arch-n-opsys fails on this machine."
247        echo "$this: !!! You must patch this by hand and repeat the installation."
248        exit 2
249    else
250        vsay $this: Script $BINDIR/.arch-n-opsys reports $ARCH_N_OPSYS.
251    fi
252    eval $ARCH_N_OPSYS
253    
254    #
255    # now install most of the other driver scripts
256    #  (except ml-build, since we don't know $CM_DIR_ARC yet)
257    #
258  installdriver _run-sml .run-sml  installdriver _run-sml .run-sml
259  installdriver _link-sml .link-sml  installdriver _link-sml .link-sml
260  installdriver _ml-build ml-build  installdriver _ml-makedepend ml-makedepend
261    
262  #  #
263  # set some architecture dependent run-time system flags  # set some architecture dependent run-time system flags
# Line 311  Line 267 
267          ALLOC=1M          ALLOC=1M
268          ;;          ;;
269      x86)      x86)
270            # The following is the _wrong_ value for many popular x86 chips
271            # (i.e., Celerons).  However, the optimal value for those is 32k,
272            # and such a small value is not enough for the runtime system's boot
273            # code.  Therefore, we use 256k here and re-set it to the proper
274            # value in .run-sml.
275          ALLOC=256k          ALLOC=256k
276          ;;          ;;
277      alpha32)      alpha32)
# Line 328  Line 289 
289      linux)      linux)
290          EXTRA_DEFS=`$CONFIGDIR/chk-global-names.sh`          EXTRA_DEFS=`$CONFIGDIR/chk-global-names.sh`
291          if [ "$?" != "0" ]; then          if [ "$?" != "0" ]; then
292              echo "!!! Problems checking for underscores in global names."              complain "$this: !!! Problems checking for underscores in asm names."
             exit 1  
293          fi          fi
294          EXTRA_DEFS="XDEFS=$EXTRA_DEFS"          EXTRA_DEFS="XDEFS=$EXTRA_DEFS"
295          ;;          ;;
# Line 338  Line 298 
298  #  #
299  # the name of the bin files directory  # the name of the bin files directory
300  #  #
301  BOOT_FILES=sml.boot.$ARCH-unix  BOOT_ARCHIVE=boot.$ARCH-unix
302    BOOT_FILES=sml.$BOOT_ARCHIVE
303    
304  #  #
305  # build the run-time system  # build the run-time system
306  #  #
 unpack "run-time" $SRCDIR runtime $ROOT/$VERSION-runtime  
307  if [ -x $RUNDIR/run.$ARCH-$OPSYS ]; then  if [ -x $RUNDIR/run.$ARCH-$OPSYS ]; then
308      echo Run-time system already exists.      vsay $this: Run-time system already exists.
309  else  else
310        $CONFIGDIR/unpack $ROOT runtime
311      cd $SRCDIR/runtime/objs      cd $SRCDIR/runtime/objs
312      echo Compiling the run-time system.      echo $this: Compiling the run-time system.
313      $MAKE -f mk.$ARCH-$OPSYS $EXTRA_DEFS      $MAKE -f mk.$ARCH-$OPSYS $EXTRA_DEFS
314      if [ -x run.$ARCH-$OPSYS ]; then      if [ -x run.$ARCH-$OPSYS ]; then
315          mv run.$ARCH-$OPSYS $RUNDIR          mv run.$ARCH-$OPSYS $RUNDIR
316          # $MAKE MAKE=$MAKE clean          $MAKE MAKE=$MAKE clean
317      else      else
318          echo "!!! Run-time system build failed for some reason."          complain "$this: !!! Run-time system build failed for some reason."
         exit 1  
319      fi      fi
320  fi  fi
321  cd $SRCDIR  cd $SRCDIR
# Line 364  Line 324 
324  # boot the base SML system  # boot the base SML system
325  #  #
326  if [ -r $HEAPDIR/sml.$HEAP_SUFFIX ]; then  if [ -r $HEAPDIR/sml.$HEAP_SUFFIX ]; then
327      echo Heap image $HEAPDIR/sml.$HEAP_SUFFIX already exists.      vsay $this: Heap image $HEAPDIR/sml.$HEAP_SUFFIX already exists.
328        fish $LIBDIR/basis.cm
329        # ignore requested arc name since we have to live with what is there:
330        export CM_DIR_ARC
331        CM_DIR_ARC=$ORIG_CM_DIR_ARC
332  else  else
333      unpack bin $ROOT $BOOT_FILES $ROOT/$VERSION-$BOOT_FILES      $CONFIGDIR/unpack $ROOT $BOOT_ARCHIVE
334    
335        fish $ROOT/$BOOT_FILES/basis.cm
336    
337        cd $ROOT
338    
339        # Target arc:
340        export CM_DIR_ARC
341        CM_DIR_ARC=${CM_DIR_ARC:-".cm"}
342    
343        if [ $CM_DIR_ARC = $ORIG_CM_DIR_ARC ] ; then
344            : we are happy
345        else
346            # now we have to make a symbolic link for each occurrence of
347            # $ORIG_CM_DIR_ARC to $CM_DIR_ARC
348            dirarcs ${ORIG_CM_DIR_ARC} ${CM_DIR_ARC} $BOOT_FILES
349        fi
350    
351      cd $ROOT/$BOOT_FILES      cd $ROOT/$BOOT_FILES
352    
353        # now link (boot) the system and let it initialize itself...
354      if $BINDIR/.link-sml @SMLheap=$ROOT/sml @SMLboot=BOOTLIST @SMLalloc=$ALLOC      if $BINDIR/.link-sml @SMLheap=$ROOT/sml @SMLboot=BOOTLIST @SMLalloc=$ALLOC
355      then      then
356          cd $ROOT          cd $ROOT
# Line 380  Line 363 
363              # the pathconfig file.              # the pathconfig file.
364              #              #
365              cd $ROOT/$BOOT_FILES              cd $ROOT/$BOOT_FILES
366              for lib in *.cm ; do              for anchor in * ; do
367                  echo $lib $LIBDIR/$lib >>$CM_PATHCONFIG_DEFAULT                  if [ -d $anchor ] ; then
368                  movelibs $ROOT/$BOOT_FILES/$lib $lib                      echo $anchor $anchor >>$CM_PATHCONFIG
369                        move $anchor $LIBDIR/$anchor
370                    fi
371              done              done
372              cd $ROOT              cd $ROOT
373              # rm -rf $BOOT_FILES              # $BOOT_FILES is now only an empty skeleton, let's get rid of it.
374                rm -rf $BOOT_FILES
375    
376          else          else
377              echo "!!! Boot code did not produce heap image (sml.$HEAP_SUFFIX)."              complain "$this !!! No heap image generated (sml.$HEAP_SUFFIX)."
             exit 1  
378          fi          fi
379      else      else
380          echo "!!! Boot code failed, no heap image built (sml.$HEAP_SUFFIX)."          complain "$this !!! Boot code failed, no heap image (sml.$HEAP_SUFFIX)."
         exit 1  
381      fi      fi
382  fi  fi
383    
384  #  #
385  # Initialize $LIBLIST  # now that we know CM_DIR_ARC we can install the ml-build driver...
386  #  #
387  cd $ROOT  installdriver _ml-build ml-build
 rm -f $LOCALPATHCONFIG $LIBLIST  
 echo 'OS.Process.exit (if true' >$LIBLIST  
   
 #  
 # now build (or prepare to build) the individual targets  
 #  
 cd $SRCDIR  
 echo Installing other targets.  
 for i in $TARGETS ; do  
     case $i in  
       src-smlnj)  
         for src in compiler cm MLRISC smlnj-lib ml-yacc system  
         do  
             unpack $src $ROOT/src $src $ROOT/$VERSION-$src  
         done  
         ;;  
       ml-yacc)  
         standalone ml-yacc ML-Yacc src  
         echo ml-yacc $TOOLDIR >>$CM_PATHCONFIG_DEFAULT  
         ;;  
       ml-lex)  
         standalone ml-lex ML-Lex  
         echo ml-lex $TOOLDIR >>$CM_PATHCONFIG_DEFAULT  
         ;;  
       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  
388    
389          # Don't make the Util library -- it came pre-made and has been  cd $ROOT
         # 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  
390    
391  #  #
392  # Now go and stabilize all registered libraries...  # Now do all the rest using the precompiled installer:
 # This is done with library sources in their original locations inside  
 # $SRCDIR, so we must consult $LOCALPATHCONFIG.  
393  #  #
394    echo $this: Installing other libraries and programs:
395  echo Compiling library code.  export ROOT INSTALLDIR CONFIGDIR BINDIR
396  echo 'then OS.Process.success else OS.Process.failure);' >>$LIBLIST  if $BINDIR/sml -m \$smlnj/installer.cm
397  if CM_LOCAL_PATHCONFIG=$LOCALPATHCONFIG $BINDIR/sml <$LIBLIST ; then  then
398      echo Libraries compiled successfully.      vsay $this: Installation complete.
399  else  else
400      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  
401  fi  fi
402    
403  exit 0  exit 0

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

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