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

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

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

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

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

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