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.63/install.sh
ViewVC logotype

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

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

revision 489, Tue Nov 23 12:55:00 1999 UTC revision 1747, Fri Jan 14 23:53:21 2005 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 take advantage of a new portable installer
10    # script for everything after booting the interactive system.
11    #
12    # Author: Matthias Blume (blume@tti-c.org)
13    #
14    
15    if [ x${INSTALL_QUIETLY} = xtrue ] ; then
16        export CM_VERBOSE
17        CM_VERBOSE=false
18    fi
19    
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    
 #set -x  
37    
38  #  #
39  # get the target list  # create the preloads.standard file
40  #  #
41  if [ ! -r config/targets ]; then  if [ ! -r config/preloads ]; then
42    echo "!!! File config/targets is missing."      complain "$this: !!! File config/preloads is missing."
   exit 1;  
43  fi  fi
44  . config/targets  cp config/preloads preloads.standard
45    
46  #  #
47  # some OSs have make in strange places  # Some OSs have make in strange places, but most of the time it is
48    # simply on the PATH:
49  #  #
50  MAKE=make  MAKE=make
51    
 #  
 # check for ksh  
 #  
 # ksh causes some people problems so we will always use /bin/sh  
 #  
 #echo "checking for ksh"  
 #if [ -x /bin/ksh ]; then  
 #  SHELL=/bin/ksh  
 #elif [ -x /usr/local/bin/ksh ]; then  
 #  SHELL=/usr/local/bin/ksh  
 #else  
52    SHELL=/bin/sh    SHELL=/bin/sh
53  #fi  vsay $this: Using shell $SHELL.
 echo 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 54  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  
76    
77  #  #
78  # the paths to ml-yacc, ml-burg, and ml-lex; needed to configure CM  # files to be deleted after we are done...
79  #  #
80  YACCPATH=$BINDIR/ml-yacc  tmpfiles=""
81  LEXPATH=$BINDIR/ml-lex  tmpfiles="$tmpfiles preloads.standard"
82  BURGPATH=$BINDIR/ml-burg  #
83    # make sure we always clean up after ourselves...
84    #
85    trap 'cd "$ROOT"; rm -f $tmpfiles' 0 1 2 3 15
86    
87    
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_YACC_DEFAULT=$YACCPATH  export CM_PATHCONFIG
94  CM_LEX_DEFAULT=$LEXPATH  CM_PATHCONFIG=$LIBDIR/pathconfig
 CM_BURG_DEFAULT=$BURGPATH  
 CM_PATHCONFIG_DEFAULT=$LIBDIR/pathconfig  
 export CM_YACC_DEFAULT CM_LEX_DEFAULT CM_BURG_DEFAULT CM_PATHCONFIG_DEFAULT  
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  makedir() {  . "$CONFIGDIR"/srcarchiveurl
106      if [ ! -d $1 ] ; then  vsay $this: URL of source archive is $SRCARCHIVEURL.
         echo Making directory $1  
         if mkdir $1 ; then  
             : everything is fine  
         else  
             echo "!!! Unable to make directory $1!"  
             exit 1  
         fi  
     fi  
 }  
107    
108  #  #
109  # Function to unpack a source archive.  # Function to make a directory including its ancestors.
110  #  #
111  # $1: descriptive name of the sources to be unpacked  makedir() {
112  # $2: the directory into which to unpack the sources      if [ x"$1" = x ] ; then
113  # $3: the sub-directory of $2 that is going to be created by unpacking          :
114  # $4: the basename of the source archive (the script will check several      elif [ -d "$1" ] ; then
115  #     different suffixes to determine what kind of de-compression is to          :
116  #     be used)      else
117  unpack() {          makedirtmp=`dirname "$1"`
118      if [ ! -d $2/$3 ]; then          makedir "$makedirtmp"
119          echo Unpacking $1 source files.          if [ x${INSTALL_VERBOSE} = xtrue ] ; then
120          cd $2              vsay "$this: Making directory $1"
         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 files are missing."  
             exit 1  
121          fi          fi
122          if [ ! -d $2/$3 ]; then          if mkdir "$1" ; then
123              echo "!!! Unable to unpack $1 source files."              :
124              exit 1          else
125                complain "$this: !!! Unable to make directory $1!"
126          fi          fi
127      fi      fi
128  }  }
129    
130  #  #
131  # Move the stable archive of a library whose description file was $1/$2 to  # Fish out the CM metadata directory name from library files
132  # $LIBDIR/$2/CM/$ARCH-unix/$2 so that it appears as if the description file  # and store it in ORIG_CM_DIR_ARC.
133  # had been at $LIBDIR/$2/$2  # The single argument is the name of the directory containing
134  #  # a single subdirectory which is a CM metadata directory:
135  # (This script will also move all other libraries that show up in  #
136  #  $1/CM/$ARCH-unix because in the case of the boot directory this indicates  fish() {
137  #  that some library did not have its own path anchor but was specified      cd "$1"
138  #  relative to $1/$2. Still, don't rely on this to be robust -- rather make      ORIG_CM_DIR_ARC=unknown
139  #  separate anchors for every library!)      for i in * .[a-zA-Z0-9]* ; do
140  #          if [ -d $i ] ; then
141  movelibs() {              ORIG_CM_DIR_ARC=$i
142      for lib in `/bin/ls $1/CM/$ARCH-unix` ; do              break
143          case $lib in          fi
         *.cm)  
             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  
144       done       done
145        if [ $ORIG_CM_DIR_ARC = unknown ] ; then
146            complain "$this: could not determine CM metadata directory name"
147        else
148            echo "$this: CM metadata directory name is \"${ORIG_CM_DIR_ARC}\""
149        fi
150  }  }
151    
152  # A shell function that registers a library for being built.  
153  # This function takes two arguments: 1. a name under which the library  # A function to move all stable library files to a parallel directory
154  # is to be known later (something.cm) and 2. the path relative to $SRCDIR  # hierarchy.
155  # that leads to the library's .cm file.  The library's .cm file must be the  # The first argument must be a simple path (no / inside), and
156  # same as $1.  # the second argument must be an absolute path.
157  #  move() {
158  # This works by adding ML code to file $LIBLIST.  The code in this file      if [ -L "$1" ] ; then
159  # will be executed near the end of this script.  If $MOVE_LIBRARIES is          rm -f "$1"           # remove symbolic link made by diracs (see below)
160  # set to true, then reglib will also register a "movelibs" to be executed at      elif [ -d "$1" ] ; then
161  # the end by putting a "movelibs" line into $LIBMOVESCRIPT.          if [ ! -d "$2" ] ; then
162                if [ -f "$2" ] ; then
163  reglib() {                  complain $this: $2 exists as a non-directory.
164      if [ x$MOVE_LIBRARIES = xtrue ] ; then              fi
165          FINALLOCATION=$LIBDIR/$1              mkdir "$2"
166      else          fi
167          FINALLOCATION=$SRCDIR/$2          cd "$1"
168      fi          for i in * .[a-zA-Z0-9]* ; do
169      if [ -d $FINALLOCATION/CM/$ARCH-unix ] ; then              move "$i" "$2"/"$i"
170          echo "Library $1 already exists in $FINALLOCATION."          done
171      else          cd ..
172          echo "Scheduling library $1 to be built in $FINALLOCATION."      elif [ -f "$1" ] ; then
173          echo "andalso CM.stabilize false \"$1\"" >>$LIBLIST          rm -f "$2"
174          echo $1 $SRCDIR/$2 >>$LOCALPATHCONFIG          mv "$1" "$2"
         if [ x$MOVE_LIBRARIES = xtrue ] ; then  
             echo movelibs $SRCDIR/$2 $1 >>$LIBMOVESCRIPT  
         fi  
         echo $1 $FINALLOCATION >>$CM_PATHCONFIG_DEFAULT  
175      fi      fi
176  }  }
177    
178  #  #
179  # Function to build a standalone program such as ml-yacc.  The function takes  # Traverse the directory tree rooted at $3 (must be single arc!).
180  # 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
181  # is the directory name under $SRCDIR where the sources reside.  The second  # and establish $1 as a symbolic link to $2:
182  # argument is a descriptive name for the program (passed on to "unpack").  #
183  # The optional third argument specifies the path relative to $SRCDIR/$1  dirarcs() {
184  # of the directory where the program's heap image is to be found.      if [ -d "$3" ] ; then
185  #          if [ "$3" = "$1" ] ; then
186                mv "$1" "$2"
187  standalone() {              ln -s "$2" "$1"
188      TARGET=$1.$HEAP_SUFFIX          else
189      if [ $# = 3 ] ; then              cd "$3"
190          TARGETLOC=$3/$TARGET              for d in * .[a-zA-Z0-9]* ; do
191      else                  dirarcs "$1" "$2" "$d"
192          TARGETLOC=$TARGET              done
193      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."  
194          fi          fi
195      fi      fi
196  }  }
197    
198    
199    ######################################################################
200    
201  #  #
202  # create the various sub directories  # create the various sub directories
203  #  #
204  for dir in $BINDIR $HEAPDIR $RUNDIR $LIBDIR $SRCDIR  for dir in "$BINDIR" "$HEAPDIR" "$RUNDIR" "$LIBDIR" "$SRCDIR" ; do
205  do      makedir "$dir"
     makedir $dir  
206  done  done
207    
208    #
209    # Function to install a "driver" script...
210    #   This takes care of patching the source of the script with the SHELL,
211    #   BINDIR, and VERSION variables to use.
212    #
213    installdriver() {
214        dsrc=$1
215        ddst=$2
216    # We install the driver unconditionally. (It would be better to test
217    # for an outdated driver script, but not all "test" commands understand
218    # the -nt comparison operator....)
219    #   if [ -x $BINDIR/$ddst ]; then
220    #       echo $this: Script $BINDIR/$ddst already exists.
221    #   else
222            rm -f "$BINDIR"/"$ddst"
223            cat "$CONFIGDIR"/"$dsrc" | \
224            sed -e "s,@SHELL@,$SHELL,g" \
225                -e "s,@BINDIR@,$BINDIR," \
226                -e "s,@VERSION@,$VERSION," \
227                -e "s,@CMDIRARC@,${CM_DIR_ARC:-dummy}," \
228                > "$BINDIR"/"$ddst"
229            chmod 555 "$BINDIR"/"$ddst"
230            if [ ! -x "$BINDIR"/"$ddst" ]; then
231                complain "$this: !!! Installation of $BINDIR/${ddst} failed."
232            fi
233    #   fi
234    }
235    
236  #  #
237  # install the script that tests the architecture, and make sure that it works  # install the script that tests architecture and os...
238  #  #
239  if [ -x $BINDIR/.arch-n-opsys ]; then  installdriver _arch-n-opsys .arch-n-opsys
240    echo Script $BINDIR/.arch-n-opsys already exists.  
241  else  #
242    cat $CONFIGDIR/_arch-n-opsys | sed -e "s,@SHELL@,$SHELL,g" > $BINDIR/.arch-n-opsys  # run it to figure out what architecture and os we are using, define
243    chmod 555 $BINDIR/.arch-n-opsys  # corresponding variables...
244    if [ ! -x $BINDIR/.arch-n-opsys ]; then  #
245      echo "!!! Installation of $BINDIR/.arch-n-opsys failed for some reason."  ARCH_N_OPSYS=`"$BINDIR"/.arch-n-opsys`
     exit 1  
   fi  
 fi  
 ARCH_N_OPSYS=`$BINDIR/.arch-n-opsys`  
246  if [ "$?" != "0" ]; then  if [ "$?" != "0" ]; then
247    echo "!!! Script $BINDIR/.arch-n-opsys fails on this machine."      echo "$this: !!! Script $BINDIR/.arch-n-opsys fails on this machine."
248    echo "!!! You must patch this by hand and repeat the installation."      echo "$this: !!! You must patch this by hand and repeat the installation."
249    exit 2    exit 2
250  else  else
251    echo Script $BINDIR/.arch-n-opsys reports $ARCH_N_OPSYS.      vsay $this: Script $BINDIR/.arch-n-opsys reports $ARCH_N_OPSYS.
252  fi  fi
253  eval $ARCH_N_OPSYS  eval $ARCH_N_OPSYS
254    
255  if [ -x $BINDIR/.run-sml ]; then  #
256    echo Script $BINDIR/.run-sml already exists.  # now install most of the other driver scripts
257  else  #  (except ml-build, since we don't know $CM_DIR_ARC yet)
258    cat $CONFIGDIR/_run-sml | \  #
259      sed -e "s,@SHELL@,$SHELL,g" -e "s,@BINDIR@,$BINDIR," -e "s,@VERSION@,$VERSION," \  installdriver _run-sml .run-sml
260      > $BINDIR/.run-sml  installdriver _link-sml .link-sml
261    chmod 555 $BINDIR/.run-sml  installdriver _ml-makedepend ml-makedepend
262    if [ ! -x $BINDIR/.run-sml ]; then  
263      echo "!!! Installation of $BINDIR/.run-sml failed for some reason."  installdriver _heap2exec heap2exec
     exit 1  
   fi  
 fi  
264    
265  #  #
266  # set some architecture dependent run-time system flags  # set some architecture dependent run-time system flags
267  #  #
268  case $ARCH in  case $ARCH in
269    mips*) ALLOC=1M ;;      mips*)
270            ALLOC=1M
271            ;;
272    x86)    x86)
273            # The following is the _wrong_ value for many popular x86 chips
274            # (i.e., Celerons).  However, the optimal value for those is 32k,
275            # and such a small value is not enough for the runtime system's boot
276            # code.  Therefore, we use 256k here and re-set it to the proper
277            # value in .run-sml.
278      ALLOC=256k      ALLOC=256k
279    ;;    ;;
280    alpha32)    alpha32)
# Line 288  Line 284 
284      ALLOC=512k      ALLOC=512k
285    ;;    ;;
286  esac  esac
287    
288  case $OPSYS in  case $OPSYS in
289    solaris)    solaris)
290      MAKE=/usr/ccs/bin/make      MAKE=/usr/ccs/bin/make
# Line 295  Line 292 
292    linux)    linux)
293      EXTRA_DEFS=`$CONFIGDIR/chk-global-names.sh`      EXTRA_DEFS=`$CONFIGDIR/chk-global-names.sh`
294      if [ "$?" != "0" ]; then      if [ "$?" != "0" ]; then
295        echo "!!! Problems checking for underscores in global names."              complain "$this: !!! Problems checking for underscores in asm names."
       exit 1  
296      fi      fi
297      EXTRA_DEFS="XDEFS=$EXTRA_DEFS"      EXTRA_DEFS="XDEFS=$EXTRA_DEFS"
298    ;;    ;;
# Line 305  Line 301 
301  #  #
302  # the name of the bin files directory  # the name of the bin files directory
303  #  #
304  BOOT_FILES=comp.boot.$ARCH-unix  BOOT_ARCHIVE=boot.$ARCH-unix
305    BOOT_FILES=sml.$BOOT_ARCHIVE
306    
307  #  #
308  # build the run-time system  # build the run-time system
309  #  #
310  unpack "run-time" $SRCDIR runtime $ROOT/$VERSION-runtime  if [ -x "$RUNDIR"/run.$ARCH-$OPSYS ]; then
311  if [ ! -x $RUNDIR/run.$ARCH-$OPSYS ]; then      vsay $this: Run-time system already exists.
312    cd $SRCDIR/runtime/objs  else
313    echo Compiling the run-time system.      "$CONFIGDIR"/unpack "$ROOT" runtime
314        cd "$SRCDIR"/runtime/objs
315        echo $this: Compiling the run-time system.
316    $MAKE -f mk.$ARCH-$OPSYS $EXTRA_DEFS    $MAKE -f mk.$ARCH-$OPSYS $EXTRA_DEFS
317    if [ -x run.$ARCH-$OPSYS ]; then    if [ -x run.$ARCH-$OPSYS ]; then
318      mv run.$ARCH-$OPSYS $RUNDIR          mv run.$ARCH-$OPSYS "$RUNDIR"
319      # $MAKE MAKE=$MAKE clean          if [ -f runx.$ARCH-$OPSYS ]; then
320                mv runx.$ARCH-$OPSYS "$RUNDIR"
321            fi
322            $MAKE MAKE=$MAKE clean
323    else    else
324      echo "!!! Run-time system build failed for some reason."          complain "$this: !!! Run-time system build failed for some reason."
     exit 1  
325    fi    fi
326  fi  fi
327  cd $SRCDIR  cd "$SRCDIR"
328    
329  #  #
330  # boot the base SML system  # boot the base SML system
331  #  #
332  if [ -r $HEAPDIR/sml.$HEAP_SUFFIX ]; then  if [ -r "$HEAPDIR"/sml.$HEAP_SUFFIX ]; then
333    echo Heap image $HEAPDIR/sml.$HEAP_SUFFIX already exists.      vsay $this: Heap image $HEAPDIR/sml.$HEAP_SUFFIX already exists.
334        fish "$LIBDIR"/basis.cm
335        # ignore requested arc name since we have to live with what is there:
336        export CM_DIR_ARC
337        CM_DIR_ARC=$ORIG_CM_DIR_ARC
338  else  else
339    unpack bin $ROOT $BOOT_FILES $ROOT/$VERSION-$BOOT_FILES      "$CONFIGDIR"/unpack "$ROOT" "$BOOT_ARCHIVE"
340    cd $ROOT  
341    if $RUNDIR/run.$ARCH-$OPSYS @SMLheap=sml \      fish "$ROOT"/"$BOOT_FILES"/basis.cm
342          @SMLboot=$ROOT/$BOOT_FILES @SMLrtpid=`cat $BOOT_FILES/RTPID` \  
343          @SMLalloc=$ALLOC      cd "$ROOT"
344    
345        # Target arc:
346        export CM_DIR_ARC
347        CM_DIR_ARC=${CM_DIR_ARC:-".cm"}
348    
349        if [ $CM_DIR_ARC = $ORIG_CM_DIR_ARC ] ; then
350            : we are happy
351        else
352            # now we have to make a symbolic link for each occurrence of
353            # $ORIG_CM_DIR_ARC to $CM_DIR_ARC
354            dirarcs "$ORIG_CM_DIR_ARC" "$CM_DIR_ARC" "$BOOT_FILES"
355        fi
356    
357        cd "$ROOT"/"$BOOT_FILES"
358    
359        # now link (boot) the system and let it initialize itself...
360        if "$BINDIR"/.link-sml @SMLheap="$ROOT"/sml @SMLboot=BOOTLIST @SMLalloc=$ALLOC
361    then    then
362            cd "$ROOT"
363      if [ -r sml.$HEAP_SUFFIX ]; then      if [ -r sml.$HEAP_SUFFIX ]; then
364          mv sml.$HEAP_SUFFIX $HEAPDIR              mv sml.$HEAP_SUFFIX "$HEAPDIR"
365          cd $BINDIR              cd "$BINDIR"
366          ln -s .run-sml sml          ln -s .run-sml sml
   
367          #          #
368          # Now move all stable libraries to #LIBDIR and generate          # Now move all stable libraries to #LIBDIR and generate
369          # the pathconfig file.          # the pathconfig file.
370          #          #
371                cd "$ROOT"/"$BOOT_FILES"
372          cd $ROOT/$BOOT_FILES              for anchor in * ; do
373          for lib in *.cm ; do                  if [ -d $anchor ] ; then
374              echo $lib $LIBDIR/$lib >>$CM_PATHCONFIG_DEFAULT                      echo $anchor $anchor >>$CM_PATHCONFIG
375              movelibs $ROOT/$BOOT_FILES/$lib $lib                      move $anchor "$LIBDIR"/$anchor
376                    fi
377          done          done
378          cd $ROOT              cd "$ROOT"
379          # rm -rf $BOOT_FILES              # $BOOT_FILES is now only an empty skeleton, let's get rid of it.
380                rm -rf "$BOOT_FILES"
381    
382      else      else
383          echo "!!! Boot code did not produce heap image (sml.$HEAP_SUFFIX)."              complain "$this !!! No heap image generated (sml.$HEAP_SUFFIX)."
         exit 1  
384      fi      fi
385    else    else
386      echo "!!! Boot code failed, no heap image built (sml.$HEAP_SUFFIX)."          complain "$this !!! Boot code failed, no heap image (sml.$HEAP_SUFFIX)."
     exit 1  
387    fi    fi
388  fi  fi
389    
390  #  #
391  # Initialize $LIBLIST  # now that we know CM_DIR_ARC we can install the ml-build driver...
392  #  #
393  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 comp-lib 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  
         ;;  
       ml-lex)  
         standalone ml-lex ML-Lex  
         ;;  
       ml-burg)  
         standalone ml-burg ML-Burg  
         ;;  
       smlnj-lib)  
         unpack "SML/NJ Library" $SRCDIR smlnj-lib $ROOT/$VERSION-smlnj-lib  
394    
395          # 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  
         # make the Unix library  
             reglib unix-lib.cm smlnj-lib/Unix  
         # make the INet library  
             reglib inet-lib.cm smlnj-lib/INet  
         # make the HTML library  
             reglib html-lib.cm smlnj-lib/HTML  
         # make the PP library  
             reglib pp-lib.cm smlnj-lib/PP  
         # 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  
396    
397  #  #
398  # 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.  
399  #  #
400    echo $this: Installing other libraries and programs:
401  echo Compiling library code.  export ROOT INSTALLDIR CONFIGDIR BINDIR
402  echo 'then OS.Process.success else OS.Process.failure);' >>$LIBLIST  if "$BINDIR"/sml -m \$smlnj/installer.cm
403  if CM_LOCAL_PATHCONFIG=$LOCALPATHCONFIG $BINDIR/sml <$LIBLIST ; then  then
404      echo Libraries compiled successfully.      vsay $this: Installation complete.
405  else  else
406      echo "!!! Something went wrong when compiling the libraries."      complain "$this: !!! Installation of libraries and programs failed."
     exit 1  
 fi  
 rm -f $LIBLIST $LOCALPATHCONFIG  
   
 #  
 # Finally, move the libraries to their final locations...  
 #  
   
 if [ -r $LIBMOVESCRIPT ] ; then  
     echo Moving libraries to $LIBDIR.  
     . $LIBMOVESCRIPT  
     rm -f $LIBMOVESCRIPT  
407  fi  fi
408    
409    exit 0

Legend:
Removed from v.489  
changed lines
  Added in v.1747

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