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

Diff of /config/trunk/install.sh

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

revision 526, Thu Jan 13 06:07:45 2000 UTC revision 615, Wed Apr 12 04:52:09 2000 UTC
# Line 2  Line 2 
2  #  #
3  # Copyright (c) 1994 AT&T Bell Laboratories.  # Copyright (c) 1994 AT&T Bell Laboratories.
4  #  #
5  # installation script for SML/NJ and related tools; this is a temporary  # Installation script for SML/NJ and related tools; this is a temporary
6  # placeholder until the configuration tool is finished.  # placeholder until the configuration tool is finished.
7  #  #
8    # Significant changes to accommodate (and take advantage of) the new CM
9    # by M.Blume (2/2000).
10    #
11    
12  #set -x  this=$0
13    
14  #  #
15  # get the target list  # get the target list
16  #  #
17  if [ ! -r config/targets ]; then  if [ ! -r config/targets ]; then
18      echo "!!! File config/targets is missing."      echo "$this: !!! File config/targets is missing."
19      exit 1      exit 1
20  fi  fi
21  . config/targets  . config/targets
# Line 21  Line 24 
24  # create the preloads.standard file  # create the preloads.standard file
25  #  #
26  if [ ! -r config/preloads ]; then  if [ ! -r config/preloads ]; then
27      echo "!!! File config/preloads is missing."      echo "$this: !!! File config/preloads is missing."
28      exit 1      exit 1
29  fi  fi
30  cp config/preloads preloads.standard  cp config/preloads preloads.standard
31    
32  #  #
33  # some OSs have make in strange places  # Some OSs have make in strange places, but most of the time it is
34    # simply on the PATH:
35  #  #
36  MAKE=make  MAKE=make
37    
 #  
 # 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  
38    SHELL=/bin/sh    SHELL=/bin/sh
39  #fi  echo $this: Using shell $SHELL.
 echo Using shell $SHELL.  
40    
41  #  #
42  # set the SML root directory  # set the SML root directory
43  #  #
44  REAL_PWD=`pwd`  REAL_PWD=`pwd`
45  ROOT=${PWD:-$REAL_PWD}  ROOT=${PWD:-$REAL_PWD}
46  echo SML root is $ROOT.  echo $this: SML root is $ROOT.
47  echo Installation directory is ${INSTALLDIR:=$ROOT}.  echo $this: Installation directory is ${INSTALLDIR:=$ROOT}.
48    
49  #  #
50  # set the various directory and file pathname variables  # set the various directory and file pathname variables
# Line 67  Line 59 
59  LIBMOVESCRIPT=$ROOT/libmove     # a temporary script  LIBMOVESCRIPT=$ROOT/libmove     # a temporary script
60  LOCALPATHCONFIG=$INSTALLDIR/pathconfig # a temporary pathconfig file  LOCALPATHCONFIG=$INSTALLDIR/pathconfig # a temporary pathconfig file
61    
62    URLGETTER=unknown
63    
64  #  #
65  # the path to the dir where ml-yacc, ml-burg, and ml-lex live  # the path to the dir where ml-yacc, ml-burg, ml-lex, and ml-build live
66  #  #
67  TOOLDIR=$BINDIR  TOOLDIR=$BINDIR
68    
69  #  #
70    # files to be deleted after we are done...
71    #
72    tmpfiles=""
73    tmpfiles="$tmpfiles $ROOT/preloads.standard"
74    tmpfiles="$tmpfiles $LIBLIST"
75    tmpfiles="$tmpfiles $LOCALPATHCONFIG"
76    tmpfiles="$tmpfiles $LIBMOVESCRIPT"
77    #
78    # make sure we always clean up after ourselves...
79    #
80    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_DEFAULT.
# Line 84  Line 92 
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.  echo $this: Installing version $VERSION.
96    
97    #
98    # the URL for the (usually remote) source archive
99    #
100    SRCARCHIVEURL=`cat $CONFIGDIR/srcarchiveurl`
101    echo $this: URL of source archive is $SRCARCHIVEURL.
102    
103  #  #
104  # Function to make a directory (and advertise such action).  # Function to make a directory (and advertise such action).
105  #  #
106  makedir() {  makedir() {
107      if [ ! -d $1 ] ; then      if [ ! -d $1 ] ; then
108          echo Making directory $1          echo $this: Making directory $1
109          if mkdir $1 ; then          if mkdir $1 ; then
110              : everything is fine              : everything is fine
111          else          else
112              echo "!!! Unable to make directory $1!"              echo "$this: !!! Unable to make directory $1!"
113                exit 1
114            fi
115        fi
116    }
117    
118    #
119    # Function for asking user to fetch source archive.
120    #   $1 - descriptive name
121    #   $2 - base name without extension, without version, and without dir
122    #   $3 - remote directory
123    #
124    askurl() {
125        echo "$this: Please, fetch $1 archive"
126        echo ' ('$2.'*' or $VERSION-$2.'*)'
127        echo " from $3"
128        echo " and then re-run this script!"
129              exit 1              exit 1
130    }
131    
132    #
133    # Function for fetching source archives automatically using wget or lynx.
134    #   $1 - command to actually get the stuff
135    #   $2 - descriptive name
136    #   $3 - base name without extension and without dir
137    #   $4 - remote directory
138    #
139    fetchurl() {
140        getter=$1 ; shift
141        echo $this: Fetching $1 from $3. Please stand by...
142        fetched=no
143        for base in $2 $VERSION-$2 ; do
144            for ext in tar.gz tgz tar.Z tz tar tar.bz2 ; do
145                try=$base.$ext
146                echo $this: Trying $try ...
147                if $getter $3 $try $ROOT/$try ; then
148                    fetched=yes
149                    echo $this: Fetching $try was a success.
150                    break 2         # get out of both for-loops
151                else
152                    rm -f $ROOT/$try
153                fi
154            done
155        done
156        if [ $fetched = no ] ; then
157            echo $this: Fetching $try was no success.
158            echo '  ' You should try to do it manually now.
159            askurl "$1" "$2" "$3"
160        fi
161    }
162    
163    usewget() {
164        wget -nv -O $3 $1/$2
165    }
166    
167    uselynx() {
168        lynx -source $1/$2 >$3
169    }
170    
171    testurlgetter() {
172        (exec >/dev/null 2>&1 ; exec $*)
173    }
174    
175    #
176    # Function to check whether wget or lynx is available.
177    # Set URLGETTER accordingly.
178    #
179    urlgetter() {
180        if [ "$URLGETTER" = unknown ] ; then
181            if testurlgetter wget --help ; then
182                URLGETTER="fetchurl usewget"
183            elif testurlgetter lynx -help ; then
184                URLGETTER="fetchurl uselynx"
185            else
186                URLGETTER="askurl"
187            fi
188          fi          fi
189    }
190    
191    un_tar() {
192        echo "$this: Un-TAR-ing $1 archive."
193        tar -xf $2
194    }
195    
196    un_tar_Z() {
197        echo "$this: Un-COMPRESS-ing and un-TAR-ing $1 archive."
198        zcat $2 | tar -xf -
199    }
200    
201    un_tar_gz() {
202        echo "$this: Un-GZIP-ing and un-TAR-ing $1 archive."
203        gunzip -c $2 | tar -xf -
204    }
205    
206    un_tar_bz2() {
207        echo "$this: Un-BZIP2-ing and un-TAR-ing $1 archive."
208        bunzip2 -c $2 | tar -xf -
209    }
210    
211    unarchive() {
212        # $1: descriptive string, $2: archive, $3: unpacker
213        if [ -r $ROOT/$2 ] ; then
214            $3 "$1" $ROOT/$2
215        elif [ -r $ROOT/$VERSION-$2 ]; then
216            $3 "$1" $ROOT/$VERSION-$2
217        else
218            return 1
219      fi      fi
220  }  }
221    
# Line 110  Line 228 
228  # $4: the basename of the source archive (the script will check several  # $4: the basename of the source archive (the script will check several
229  #     different suffixes to determine what kind of de-compression is to  #     different suffixes to determine what kind of de-compression is to
230  #     be used)  #     be used)
231  unpack() {  #
232      if [ ! -d $2/$3 ]; then  # fetch_n_unpack is the helper function that does the real work.  If
233          echo Unpacking $1 source files.  # no archive is found locally, it invokes $URLGETTER and tries again.
234    # The variable $tryfetch is used to make sure this happens only once.
235    fetch_n_unpack() {
236          cd $2          cd $2
237          if [ -r $4.tar.Z ] ; then      if unarchive "$1" $4.tar.gz un_tar_gz ||
238              zcat $4.tar.Z | tar -xf -         unarchive "$1" $4.tgz un_tar_gz ||
239          elif [ -r $4.tar ] ; then         unarchive "$1" $4.tar.Z un_tar_Z ||
240              tar -xf $4.tar         unarchive "$1" $4.tar un_tar ||
241          elif [ -r $4.tar.gz ] ; then         unarchive "$1" $4.tar.bz1 un_tar_bz2 ||
242              gunzip -c $4.tar.gz | tar -xf -         unarchive "$1" $4.tz un_tar_Z
243          elif [ -r $4.tar.bz2 ] ; then      then
244              bunzip2 -c $4.tar.bz2 | tar -xf -          : we are done
245          elif [ -r $4.tgz ] ; then      elif [ $tryfetch = yes ] ; then
246              gunzip -c $4.tgz | tar -xf -          urlgetter
247          elif [ -r $4.tz ] ; then          $URLGETTER "$1" $4 $SRCARCHIVEURL
248              zcat $4.tz | tar -xf -          tryfetch=no
249            fetch_n_unpack "$1" "$2" "$3" "$4"
250        fi
251    }
252    
253    #
254    # The main "unpack" driver function that invokes the above helper.
255    #
256    unpack() {
257        tryfetch=yes
258        if [ -d $2/$3 ]; then
259            echo "$this: The $1 tree already exists."
260          else          else
261              echo "!!! The $1 source files are missing."          fetch_n_unpack "$1" "$2" "$3" "$4"
             exit 1  
262          fi          fi
263          if [ ! -d $2/$3 ]; then          if [ ! -d $2/$3 ]; then
264              echo "!!! Unable to unpack $1 source files."          echo "$this: !!! Unable to unpack $1 archive."
265              exit 1              exit 1
266          fi          fi
267    }
268    
269    # A function to move all stable library files to a parallel directory
270    # hierarchy.
271    # The first argument must be a simple path (no / inside), and
272    # the second argument must be an absolute path.
273    move() {
274        if [ -d $1 ] ; then
275            if [ ! -d $2 ] ; then
276                if [ -f $2 ] ; then
277                    echo $this: $2 exists as a non-directory.
278                    exit 1
279                fi
280                mkdir $2
281            fi
282            cd $1
283            for i in * ; do
284                move $i $2/$i
285            done
286            cd ..
287        elif [ -f $1 ] ; then
288            rm -f $2
289            mv $1 $2
290      fi      fi
291  }  }
292    
# Line 151  Line 304 
304  movelibs() {  movelibs() {
305      for lib in `/bin/ls $1/CM/$ARCH-unix` ; do      for lib in `/bin/ls $1/CM/$ARCH-unix` ; do
306          case $lib in          case $lib in
307          *.cm)          *.cm | *.cmi)
308              if [ $lib != $2 ] ; then              if [ $lib != $2 ] ; then
309                  echo "! Warning:" $lib specified relative to $2                  echo "$this: Warning:" $lib specified relative to $2
310              fi              fi
311              echo Moving library $lib to $LIBDIR              echo $this: Moving library $lib to $LIBDIR
312              makedir $LIBDIR/$2              makedir $LIBDIR/$2
313              makedir $LIBDIR/$2/CM              makedir $LIBDIR/$2/CM
314              makedir $LIBDIR/$2/CM/$ARCH-unix              makedir $LIBDIR/$2/CM/$ARCH-unix
# Line 185  Line 338 
338          FINALLOCATION=$SRCDIR/$2          FINALLOCATION=$SRCDIR/$2
339      fi      fi
340      if [ -d $FINALLOCATION/CM/$ARCH-unix ] ; then      if [ -d $FINALLOCATION/CM/$ARCH-unix ] ; then
341          echo "Library $1 already exists in $FINALLOCATION."          echo "$this: Library $1 already exists in $FINALLOCATION."
342      else      else
343          echo "Scheduling library $1 to be built in $FINALLOCATION."          echo "$this: Scheduling library $1 to be built in $FINALLOCATION."
344          echo "andalso CM.stabilize false \"$1\"" >>$LIBLIST          echo "andalso CM.stabilize false \"$1\"" >>$LIBLIST
345          echo $1 $SRCDIR/$2 >>$LOCALPATHCONFIG          echo $1 $SRCDIR/$2 >>$LOCALPATHCONFIG
346          if [ x$MOVE_LIBRARIES = xtrue ] ; then          if [ x$MOVE_LIBRARIES = xtrue ] ; then
# Line 214  Line 367 
367          TARGETLOC=$TARGET          TARGETLOC=$TARGET
368      fi      fi
369      if [ -r $HEAPDIR/$TARGET ] ; then      if [ -r $HEAPDIR/$TARGET ] ; then
370          echo Target $TARGET already exists.          echo $this: Target $TARGET already exists.
371      else      else
372          echo Building $TARGET.          echo $this: Building $TARGET.
373          unpack $2 $SRCDIR $1 $ROOT/$VERSION-$1          unpack $2 $SRCDIR $1 $1
374          cd $SRCDIR/$1          cd $SRCDIR/$1
375          ./build          ./build
376          if [ -r $TARGETLOC ] ; then          if [ -r $TARGETLOC ] ; then
# Line 227  Line 380 
380                  ln -s .run-sml $1                  ln -s .run-sml $1
381              fi              fi
382          else          else
383              echo "!!! Build of $TARGET failed."              echo "$this: !!! Build of $TARGET failed."
384          fi          fi
385      fi      fi
386  }  }
# Line 235  Line 388 
388  #  #
389  # create the various sub directories  # create the various sub directories
390  #  #
391  for dir in $BINDIR $HEAPDIR $RUNDIR $LIBDIR $SRCDIR  for dir in $BINDIR $HEAPDIR $RUNDIR $LIBDIR $SRCDIR ; do
 do  
392      makedir $dir      makedir $dir
393  done  done
394    
   
395  #  #
396  # install the script that tests the architecture, and make sure that it works  # install the script that tests the architecture, and make sure that it works
397  #  #
398  if [ -x $BINDIR/.arch-n-opsys ]; then  if [ -x $BINDIR/.arch-n-opsys ]; then
399    echo Script $BINDIR/.arch-n-opsys already exists.      echo $this: Script $BINDIR/.arch-n-opsys already exists.
400  else  else
401    cat $CONFIGDIR/_arch-n-opsys | sed -e "s,@SHELL@,$SHELL,g" > $BINDIR/.arch-n-opsys      cat $CONFIGDIR/_arch-n-opsys \
402        | sed -e "s,@SHELL@,$SHELL,g" > $BINDIR/.arch-n-opsys
403    chmod 555 $BINDIR/.arch-n-opsys    chmod 555 $BINDIR/.arch-n-opsys
404    if [ ! -x $BINDIR/.arch-n-opsys ]; then    if [ ! -x $BINDIR/.arch-n-opsys ]; then
405      echo "!!! Installation of $BINDIR/.arch-n-opsys failed for some reason."          echo "$this: !!! Installation of $BINDIR/.arch-n-opsys failed."
406      exit 1      exit 1
407    fi    fi
408  fi  fi
409    
410  ARCH_N_OPSYS=`$BINDIR/.arch-n-opsys`  ARCH_N_OPSYS=`$BINDIR/.arch-n-opsys`
411  if [ "$?" != "0" ]; then  if [ "$?" != "0" ]; then
412    echo "!!! Script $BINDIR/.arch-n-opsys fails on this machine."      echo "$this: !!! Script $BINDIR/.arch-n-opsys fails on this machine."
413    echo "!!! You must patch this by hand and repeat the installation."      echo "$this: !!! You must patch this by hand and repeat the installation."
414    exit 2    exit 2
415  else  else
416    echo Script $BINDIR/.arch-n-opsys reports $ARCH_N_OPSYS.      echo $this: Script $BINDIR/.arch-n-opsys reports $ARCH_N_OPSYS.
417  fi  fi
418  eval $ARCH_N_OPSYS  eval $ARCH_N_OPSYS
419    
420  if [ -x $BINDIR/.run-sml ]; then  #
421    echo Script $BINDIR/.run-sml already exists.  # Function to install a "driver" script...
422  else  #   This takes care of patching the source of the script with the SHELL,
423    cat $CONFIGDIR/_run-sml | \  #   BINDIR, and VERSION variables to use.
424      sed -e "s,@SHELL@,$SHELL,g" -e "s,@BINDIR@,$BINDIR," -e "s,@VERSION@,$VERSION," \  #
425      > $BINDIR/.run-sml  installdriver() {
426    chmod 555 $BINDIR/.run-sml      dsrc=$1
427    if [ ! -x $BINDIR/.run-sml ]; then      ddst=$2
428      echo "!!! Installation of $BINDIR/.run-sml failed for some reason."  # We install the driver unconditionally. (It would be better to test
429    # for an outdated driver script, but not all "test" commands understand
430    # the -nt comparison operator....)
431    #   if [ -x $BINDIR/$ddst ]; then
432    #       echo $this: Script $BINDIR/$ddst already exists.
433    #   else
434            rm -f $BINDIR/$ddst
435            cat $CONFIGDIR/$dsrc | \
436            sed -e "s,@SHELL@,$SHELL,g" \
437                -e "s,@BINDIR@,$BINDIR," \
438                -e "s,@VERSION@,$VERSION," \
439                > $BINDIR/$ddst
440            chmod 555 $BINDIR/$ddst
441            if [ ! -x $BINDIR/$ddst ]; then
442                echo "$this: !!! Installation of $BINDIR/${ddst} failed."
443      exit 1      exit 1
444    fi    fi
445  fi  #   fi
446    }
447    
448    installdriver _run-sml .run-sml
449    installdriver _link-sml .link-sml
450    installdriver _ml-build ml-build
451    
452  #  #
453  # set some architecture dependent run-time system flags  # set some architecture dependent run-time system flags
454  #  #
455  case $ARCH in  case $ARCH in
456    mips*) ALLOC=1M ;;      mips*)
457            ALLOC=1M
458            ;;
459    x86)    x86)
460            # The following is the _wrong_ value for many popular x86 chips
461            # (i.e., Celerons).  However, the optimal value for those is 32k,
462            # and such a small value is not enough for the runtime system's boot
463            # code.  Therefore, we use 256k here and re-set it to the proper
464            # value in .run-sml.
465      ALLOC=256k      ALLOC=256k
466    ;;    ;;
467    alpha32)    alpha32)
# Line 292  Line 471 
471      ALLOC=512k      ALLOC=512k
472    ;;    ;;
473  esac  esac
474    
475  case $OPSYS in  case $OPSYS in
476    solaris)    solaris)
477      MAKE=/usr/ccs/bin/make      MAKE=/usr/ccs/bin/make
# Line 299  Line 479 
479    linux)    linux)
480      EXTRA_DEFS=`$CONFIGDIR/chk-global-names.sh`      EXTRA_DEFS=`$CONFIGDIR/chk-global-names.sh`
481      if [ "$?" != "0" ]; then      if [ "$?" != "0" ]; then
482        echo "!!! Problems checking for underscores in global names."              echo "$this: !!! Problems checking for underscores in asm names."
483        exit 1        exit 1
484      fi      fi
485      EXTRA_DEFS="XDEFS=$EXTRA_DEFS"      EXTRA_DEFS="XDEFS=$EXTRA_DEFS"
# Line 309  Line 489 
489  #  #
490  # the name of the bin files directory  # the name of the bin files directory
491  #  #
492  BOOT_FILES=sml.boot.$ARCH-unix  BOOT_ARCHIVE=boot.$ARCH-unix
493    BOOT_FILES=sml.$BOOT_ARCHIVE
494    
495  #  #
496  # build the run-time system  # build the run-time system
497  #  #
498  unpack "run-time" $SRCDIR runtime $ROOT/$VERSION-runtime  unpack "run-time" $SRCDIR runtime runtime
499  if [ ! -x $RUNDIR/run.$ARCH-$OPSYS ]; then  if [ -x $RUNDIR/run.$ARCH-$OPSYS ]; then
500        echo $this: Run-time system already exists.
501    else
502    cd $SRCDIR/runtime/objs    cd $SRCDIR/runtime/objs
503    echo Compiling the run-time system.      echo $this: Compiling the run-time system.
504    $MAKE -f mk.$ARCH-$OPSYS $EXTRA_DEFS    $MAKE -f mk.$ARCH-$OPSYS $EXTRA_DEFS
505    if [ -x run.$ARCH-$OPSYS ]; then    if [ -x run.$ARCH-$OPSYS ]; then
506      mv run.$ARCH-$OPSYS $RUNDIR      mv run.$ARCH-$OPSYS $RUNDIR
507      # $MAKE MAKE=$MAKE clean      # $MAKE MAKE=$MAKE clean
508    else    else
509      echo "!!! Run-time system build failed for some reason."          echo "$this: !!! Run-time system build failed for some reason."
510      exit 1      exit 1
511    fi    fi
512  fi  fi
# Line 333  Line 516 
516  # boot the base SML system  # boot the base SML system
517  #  #
518  if [ -r $HEAPDIR/sml.$HEAP_SUFFIX ]; then  if [ -r $HEAPDIR/sml.$HEAP_SUFFIX ]; then
519    echo Heap image $HEAPDIR/sml.$HEAP_SUFFIX already exists.      echo $this: Heap image $HEAPDIR/sml.$HEAP_SUFFIX already exists.
520  else  else
521    unpack bin $ROOT $BOOT_FILES $ROOT/$VERSION-$BOOT_FILES      unpack bin $ROOT $BOOT_FILES $BOOT_ARCHIVE
522    cd $ROOT      cd $ROOT/$BOOT_FILES
523    if $RUNDIR/run.$ARCH-$OPSYS @SMLheap=sml \      if $BINDIR/.link-sml @SMLheap=$ROOT/sml @SMLboot=BOOTLIST @SMLalloc=$ALLOC
         @SMLboot=$ROOT/$BOOT_FILES @SMLrtpid=`cat $BOOT_FILES/RTPID` \  
         @SMLalloc=$ALLOC  
524    then    then
525            cd $ROOT
526      if [ -r sml.$HEAP_SUFFIX ]; then      if [ -r sml.$HEAP_SUFFIX ]; then
527          mv sml.$HEAP_SUFFIX $HEAPDIR          mv sml.$HEAP_SUFFIX $HEAPDIR
528          cd $BINDIR          cd $BINDIR
529          ln -s .run-sml sml          ln -s .run-sml sml
   
530          #          #
531          # Now move all stable libraries to #LIBDIR and generate          # Now move all stable libraries to #LIBDIR and generate
532          # the pathconfig file.          # the pathconfig file.
533          #          #
   
534          cd $ROOT/$BOOT_FILES          cd $ROOT/$BOOT_FILES
535          for lib in *.cm ; do              for anchor in * ; do
536              echo $lib $LIBDIR/$lib >>$CM_PATHCONFIG_DEFAULT                  if [ -d $anchor ] ; then
537              movelibs $ROOT/$BOOT_FILES/$lib $lib                      echo $anchor $anchor >>$CM_PATHCONFIG_DEFAULT
538                        move $anchor $LIBDIR/$anchor
539                    fi
540          done          done
541          cd $ROOT          cd $ROOT
542          # rm -rf $BOOT_FILES              # $BOOT_FILES is now only an empty skeleton, let's get rid of it.
543                rm -rf $BOOT_FILES
544    
545      else      else
546          echo "!!! Boot code did not produce heap image (sml.$HEAP_SUFFIX)."              echo "$this !!! No heap image generated (sml.$HEAP_SUFFIX)."
547          exit 1          exit 1
548      fi      fi
549    else    else
550      echo "!!! Boot code failed, no heap image built (sml.$HEAP_SUFFIX)."          echo "$this !!! Boot code failed, no heap image (sml.$HEAP_SUFFIX)."
551      exit 1      exit 1
552    fi    fi
553  fi  fi
# Line 374  Line 557 
557  #  #
558  cd $ROOT  cd $ROOT
559  rm -f $LOCALPATHCONFIG $LIBLIST  rm -f $LOCALPATHCONFIG $LIBLIST
560  echo 'OS.Process.exit (if true' >$LIBLIST  echo 'ignore (OS.Process.exit (if true' >$LIBLIST
561    
562  #  #
563  # now build (or prepare to build) the individual targets  # now build (or prepare to build) the individual targets
564  #  #
565  cd $SRCDIR  cd $SRCDIR
566  echo Installing other targets.  echo $this: Installing other targets.
567  for i in $TARGETS ; do  for i in $TARGETS ; do
568      case $i in      case $i in
569        src-smlnj)        src-smlnj)
570          for src in compiler cm MLRISC smlnj-lib ml-yacc system          for src in compiler cm MLRISC smlnj-lib ml-yacc system
571          do          do
572              unpack $src $ROOT/src $src $ROOT/$VERSION-$src              unpack $src $ROOT/src $src $src
573          done          done
574          ;;          ;;
575        ml-yacc)        ml-yacc)
# Line 402  Line 585 
585          echo ml-burg $TOOLDIR >>$CM_PATHCONFIG_DEFAULT          echo ml-burg $TOOLDIR >>$CM_PATHCONFIG_DEFAULT
586          ;;          ;;
587        smlnj-lib)        smlnj-lib)
588          unpack "SML/NJ Library" $SRCDIR smlnj-lib $ROOT/$VERSION-smlnj-lib          unpack "SML/NJ Library" $SRCDIR smlnj-lib smlnj-lib
589    
590          # Don't make the Util library -- it came pre-made and has been          # Don't make the Util library -- it came pre-made and has been
591          # installed when making the base system.  In other words, don't do...          # installed when making the base system.  In other words, don't do...
# Line 421  Line 604 
604              reglib reactive-lib.cm smlnj-lib/Reactive              reglib reactive-lib.cm smlnj-lib/Reactive
605          ;;          ;;
606        cml)        cml)
607          unpack CML $SRCDIR cml $ROOT/$VERSION-cml          unpack CML $SRCDIR cml cml
608          reglib core-cml.cm cml/src/core-cml          reglib core-cml.cm cml/src/core-cml
609          reglib cml.cm cml/src          reglib cml.cm cml/src
610          reglib cml-basis.cm cml          reglib cml-basis.cm cml
611          ;;          ;;
612        cml-lib)        cml-lib)
613          unpack CML $SRCDIR cml $ROOT/$VERSION-cml          unpack CML $SRCDIR cml cml
614          reglib cml-lib.cm cml/cml-lib          reglib cml-lib.cm cml/cml-lib
615          ;;          ;;
616        eXene)        eXene)
617          unpack EXene $SRCDIR eXene $ROOT/$VERSION-eXene          unpack EXene $SRCDIR eXene eXene
618          reglib eXene.cm eXene          reglib eXene.cm eXene
619          ;;          ;;
620        doc)        doc)
621          unpack Doc $ROOT doc $ROOT/$VERSION-doc          unpack Doc $ROOT doc doc
622          cd $ROOT/doc          cd $ROOT/doc
623          build $ROOT          build $ROOT
624          ;;          ;;
625        *)        *)
626          echo "!!! Unknown target $i."          echo "$this: !!! Unknown target $i."
627          ;;          ;;
628      esac      esac
629  done  done
# Line 451  Line 634 
634  # $SRCDIR, so we must consult $LOCALPATHCONFIG.  # $SRCDIR, so we must consult $LOCALPATHCONFIG.
635  #  #
636    
637  echo Compiling library code.  echo $this: Compiling library code.
638  echo 'then OS.Process.success else OS.Process.failure);' >>$LIBLIST  echo 'then OS.Process.success else OS.Process.failure));' >>$LIBLIST
639  if CM_LOCAL_PATHCONFIG=$LOCALPATHCONFIG $BINDIR/sml <$LIBLIST ; then  if CM_LOCAL_PATHCONFIG=$LOCALPATHCONFIG $BINDIR/sml <$LIBLIST ; then
640      echo Libraries compiled successfully.      echo $this: Libraries compiled successfully.
641  else  else
642      echo "!!! Something went wrong when compiling the libraries."      echo "$this: !!! Something went wrong when compiling the libraries."
643      exit 1      exit 1
644  fi  fi
 rm -f $LIBLIST $LOCALPATHCONFIG  
645    
646  #  #
647  # Finally, move the libraries to their final locations...  # Finally, move the libraries to their final locations...
648  #  #
649    
650  if [ -r $LIBMOVESCRIPT ] ; then  if [ -r $LIBMOVESCRIPT ] ; then
651      echo Moving libraries to $LIBDIR.      echo $this: Moving libraries to $LIBDIR.
652      . $LIBMOVESCRIPT      . $LIBMOVESCRIPT
     rm -f $LIBMOVESCRIPT  
653  fi  fi
654    
655  #  exit 0
 # Get rid of preloads.standard  
 #  
 rm -f $ROOT/preloads.standard  

Legend:
Removed from v.526  
changed lines
  Added in v.615

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