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

sml/branches/SMLNJ/config/install.sh revision 418, Fri Sep 3 23:51:27 1999 UTC sml/trunk/config/install.sh revision 489, Tue Nov 23 12:55:00 1999 UTC
# Line 43  Line 43 
43  REAL_PWD=`pwd`  REAL_PWD=`pwd`
44  ROOT=${PWD:-$REAL_PWD}  ROOT=${PWD:-$REAL_PWD}
45  echo SML root is $ROOT.  echo SML root is $ROOT.
46    echo Installation directory is ${INSTALLDIR:=$ROOT}.
47    
48  #  #
49  # set the various directory and file pathname variables  # set the various directory and file pathname variables
50  #  #
51  BINDIR=$ROOT/bin                # main dir for binary stuff  BINDIR=$INSTALLDIR/bin          # main dir for binary stuff
52  CONFIGDIR=$ROOT/config  CONFIGDIR=$ROOT/config
53  HEAPDIR=$BINDIR/.heap           # where heap images live  HEAPDIR=$BINDIR/.heap           # where heap images live
54  RUNDIR=$BINDIR/.run             # where executables (i.e., the RTS) live  RUNDIR=$BINDIR/.run             # where executables (i.e., the RTS) live
55  SRCDIR=$ROOT/src                # where the source tree is rooted  SRCDIR=$ROOT/src                # where the source tree is rooted
56  LIBDIR=$ROOT/lib                # where libraries live  LIBDIR=$INSTALLDIR/lib          # where libraries live
57  LIBLIST=$ROOT/liblist           # list of commands to stabilize libraries  LIBLIST=$ROOT/liblist           # list of commands to stabilize libraries
58  LIBMOVESCRIPT=$ROOT/libmove     # a temporary script  LIBMOVESCRIPT=$ROOT/libmove     # a temporary script
59  LOCALPATHCONFIG=$ROOT/pathconfig # a temporary pathconfig file  LOCALPATHCONFIG=$INSTALLDIR/pathconfig # a temporary pathconfig file
60    
61  #  #
62  # the paths to ml-yacc, ml-burg, and ml-lex; needed to configure CM  # the paths to ml-yacc, ml-burg, and ml-lex; needed to configure CM
# Line 137  Line 138 
138  # $LIBDIR/$2/CM/$ARCH-unix/$2 so that it appears as if the description file  # $LIBDIR/$2/CM/$ARCH-unix/$2 so that it appears as if the description file
139  # had been at $LIBDIR/$2/$2  # had been at $LIBDIR/$2/$2
140  #  #
141  movelib() {  # (This script will also move all other libraries that show up in
142      if [ -f $1/CM/$ARCH-unix/$2 ] ; then  #  $1/CM/$ARCH-unix because in the case of the boot directory this indicates
143          echo Moving library $2 to $LIBDIR.  #  that some library did not have its own path anchor but was specified
144    #  relative to $1/$2. Still, don't rely on this to be robust -- rather make
145    #  separate anchors for every library!)
146    #
147    movelibs() {
148        for lib in `/bin/ls $1/CM/$ARCH-unix` ; do
149            case $lib in
150            *.cm)
151                if [ $lib != $2 ] ; then
152                    echo "! Warning:" $lib specified relative to $2
153                fi
154                echo Moving library $lib to $LIBDIR
155          makedir $LIBDIR/$2          makedir $LIBDIR/$2
156          makedir $LIBDIR/$2/CM          makedir $LIBDIR/$2/CM
157          makedir $LIBDIR/$2/CM/$ARCH-unix          makedir $LIBDIR/$2/CM/$ARCH-unix
158          mv $1/CM/$ARCH-unix/$2 $LIBDIR/$2/CM/$ARCH-unix/$2              mv $1/CM/$ARCH-unix/$lib $LIBDIR/$2/CM/$ARCH-unix/$lib
159      fi              ;;
160            *)
161                ;;
162            esac
163         done
164  }  }
165    
166  # A shell function that registers a library for being built.  # A shell function that registers a library for being built.
# Line 155  Line 171 
171  #  #
172  # This works by adding ML code to file $LIBLIST.  The code in this file  # This works by adding ML code to file $LIBLIST.  The code in this file
173  # will be executed near the end of this script.  If $MOVE_LIBRARIES is  # will be executed near the end of this script.  If $MOVE_LIBRARIES is
174  # set to true, then reglib will also register a "movelib" to be executed at  # set to true, then reglib will also register a "movelibs" to be executed at
175  # the end by putting a "movelib" line into $LIBMOVESCRIPT.  # the end by putting a "movelibs" line into $LIBMOVESCRIPT.
176    
177  reglib() {  reglib() {
178      echo Scheduling library $1 to be built.      if [ x$MOVE_LIBRARIES = xtrue ] ; then
179            FINALLOCATION=$LIBDIR/$1
180        else
181            FINALLOCATION=$SRCDIR/$2
182        fi
183        if [ -d $FINALLOCATION/CM/$ARCH-unix ] ; then
184            echo "Library $1 already exists in $FINALLOCATION."
185        else
186            echo "Scheduling library $1 to be built in $FINALLOCATION."
187      echo "andalso CM.stabilize false \"$1\"" >>$LIBLIST      echo "andalso CM.stabilize false \"$1\"" >>$LIBLIST
188      echo $1 $SRCDIR/$2 >>$LOCALPATHCONFIG      echo $1 $SRCDIR/$2 >>$LOCALPATHCONFIG
189      if [ x$MOVE_LIBRARIES = xtrue ] ; then      if [ x$MOVE_LIBRARIES = xtrue ] ; then
190          echo movelib $SRCDIR/$2 $1 >>$LIBMOVESCRIPT              echo movelibs $SRCDIR/$2 $1 >>$LIBMOVESCRIPT
191          echo $1 $LIBDIR/$1 >>$CM_PATHCONFIG_DEFAULT          fi
192      else          echo $1 $FINALLOCATION >>$CM_PATHCONFIG_DEFAULT
         echo $1 $SRCDIR/$2 >>$CM_PATHCONFIG_DEFAULT  
193      fi      fi
194  }  }
195    
196  #  #
197  # Function to build a standalone program such as ml-yacc.  The function takes  # Function to build a standalone program such as ml-yacc.  The function takes
198  # 2 or 3 arguments.  First the name of the program with at the same time  # 2 or 3 arguments.  First the name of the program which at the same time
199  # is the directory name under $SRCDIR where the sources reside.  The second  # is the directory name under $SRCDIR where the sources reside.  The second
200  # argument is a descriptive name for the program (passed on to "unpack").  # argument is a descriptive name for the program (passed on to "unpack").
201  # The optional third argument specifies the path relative to $SRCDIR/$1  # The optional third argument specifies the path relative to $SRCDIR/$1
# Line 294  Line 317 
317    $MAKE -f mk.$ARCH-$OPSYS $EXTRA_DEFS    $MAKE -f mk.$ARCH-$OPSYS $EXTRA_DEFS
318    if [ -x run.$ARCH-$OPSYS ]; then    if [ -x run.$ARCH-$OPSYS ]; then
319      mv run.$ARCH-$OPSYS $RUNDIR      mv run.$ARCH-$OPSYS $RUNDIR
320      $MAKE MAKE=$MAKE clean      # $MAKE MAKE=$MAKE clean
321    else    else
322      echo "!!! Run-time system build failed for some reason."      echo "!!! Run-time system build failed for some reason."
323      exit 1      exit 1
# Line 327  Line 350 
350          cd $ROOT/$BOOT_FILES          cd $ROOT/$BOOT_FILES
351          for lib in *.cm ; do          for lib in *.cm ; do
352              echo $lib $LIBDIR/$lib >>$CM_PATHCONFIG_DEFAULT              echo $lib $LIBDIR/$lib >>$CM_PATHCONFIG_DEFAULT
353              movelib $ROOT/$BOOT_FILES/$lib $lib              movelibs $ROOT/$BOOT_FILES/$lib $lib
354          done          done
355          cd $ROOT          cd $ROOT
356          rm -rf $BOOT_FILES          # rm -rf $BOOT_FILES
357    
358      else      else
359          echo "!!! Boot code did not produce heap image (sml.$HEAP_SUFFIX)."          echo "!!! Boot code did not produce heap image (sml.$HEAP_SUFFIX)."
# Line 357  Line 380 
380  for i in $TARGETS ; do  for i in $TARGETS ; do
381      case $i in      case $i in
382        src-smlnj)        src-smlnj)
383          for src in compiler comp-lib new-cm MLRISC smlnj-lib ml-yacc system          for src in compiler comp-lib cm MLRISC smlnj-lib ml-yacc system
384          do          do
385              unpack $src $ROOT/src $src $ROOT/$VERSION-$src              unpack $src $ROOT/src $src $ROOT/$VERSION-$src
386          done          done
# Line 440  Line 463 
463      . $LIBMOVESCRIPT      . $LIBMOVESCRIPT
464      rm -f $LIBMOVESCRIPT      rm -f $LIBMOVESCRIPT
465  fi  fi
466    

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

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