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 615, Wed Apr 12 04:52:09 2000 UTC revision 829, Mon May 14 15:30:56 2001 UTC
# Line 35  Line 35 
35  #  #
36  MAKE=make  MAKE=make
37    
38    #
39    # Make sure we don't have any unpleasant surprises due to the installing
40    # user's process environment:
41    #
42    unset CM_PATHCONFIG
43    
44  SHELL=/bin/sh  SHELL=/bin/sh
45  echo $this: Using shell $SHELL.  echo $this: Using shell $SHELL.
46    
# Line 56  Line 62 
62  SRCDIR=$ROOT/src                # where the source tree is rooted  SRCDIR=$ROOT/src                # where the source tree is rooted
63  LIBDIR=$INSTALLDIR/lib          # where libraries live  LIBDIR=$INSTALLDIR/lib          # where libraries live
64  LIBLIST=$ROOT/liblist           # list of commands to stabilize libraries  LIBLIST=$ROOT/liblist           # list of commands to stabilize libraries
65    LATESTANDALONES=$ROOT/latestandalones # standalone programs to be built late
66  LIBMOVESCRIPT=$ROOT/libmove     # a temporary script  LIBMOVESCRIPT=$ROOT/libmove     # a temporary script
67  LOCALPATHCONFIG=$INSTALLDIR/pathconfig # a temporary pathconfig file  LOCALPATHCONFIG=$INSTALLDIR/pathconfig # a temporary pathconfig file
68    
69  URLGETTER=unknown  URLGETTER=unknown
70    
71  #  #
72  # the path to the dir where ml-yacc, ml-burg, ml-lex, and ml-build live  # the path to the dir where ml-yacc, ml-burg, ml-lex, ml-build, and
73    # ml-makedepend live
74  #  #
75  TOOLDIR=$BINDIR  TOOLDIR=$BINDIR
76    
77  #  #
78    # A temporary file for post-editing the pathconfig file...
79    #
80    PCEDITTMP=$INSTALLDIR/pcedittmp.$$
81    
82    #
83  # files to be deleted after we are done...  # files to be deleted after we are done...
84  #  #
85  tmpfiles=""  tmpfiles=""
86  tmpfiles="$tmpfiles $ROOT/preloads.standard"  tmpfiles="$tmpfiles $ROOT/preloads.standard"
87  tmpfiles="$tmpfiles $LIBLIST"  tmpfiles="$tmpfiles $LIBLIST"
88    tmpfiles="$tmpfiles $LATESTANDALONES"
89  tmpfiles="$tmpfiles $LOCALPATHCONFIG"  tmpfiles="$tmpfiles $LOCALPATHCONFIG"
90  tmpfiles="$tmpfiles $LIBMOVESCRIPT"  tmpfiles="$tmpfiles $LIBMOVESCRIPT"
91    tmpfiles="$tmpfiles $PCEDITTMP"
92  #  #
93  # make sure we always clean up after ourselves...  # make sure we always clean up after ourselves...
94  #  #
# Line 334  Line 349 
349  reglib() {  reglib() {
350      if [ x$MOVE_LIBRARIES = xtrue ] ; then      if [ x$MOVE_LIBRARIES = xtrue ] ; then
351          FINALLOCATION=$LIBDIR/$1          FINALLOCATION=$LIBDIR/$1
352            FINALCONFIGPATH=$1
353      else      else
354          FINALLOCATION=$SRCDIR/$2          FINALLOCATION=$SRCDIR/$2
355            FINALCONFIGPATH=$FINALLOCATION
356      fi      fi
357      if [ -d $FINALLOCATION/CM/$ARCH-unix ] ; then      if [ -d $FINALLOCATION/CM/$ARCH-unix ] ; then
358          echo "$this: Library $1 already exists in $FINALLOCATION."          echo "$this: Library $1 already exists in $FINALLOCATION."
359      else      else
360          echo "$this: Scheduling library $1 to be built in $FINALLOCATION."          echo "$this: Scheduling library $1 to be built in $FINALLOCATION."
361          echo "  andalso CM.stabilize false \"$1\"" >>$LIBLIST          echo "  andalso CM.stabilize false \"\$/$1\"" >>$LIBLIST
362          echo $1 $SRCDIR/$2 >>$LOCALPATHCONFIG          echo $1 $SRCDIR/$2 >>$LOCALPATHCONFIG
363          if [ x$MOVE_LIBRARIES = xtrue ] ; then          if [ x$MOVE_LIBRARIES = xtrue ] ; then
364              echo movelibs $SRCDIR/$2 $1 >>$LIBMOVESCRIPT              echo movelibs $SRCDIR/$2 $1 >>$LIBMOVESCRIPT
365          fi          fi
         echo $1 $FINALLOCATION >>$CM_PATHCONFIG_DEFAULT  
366      fi      fi
367        echo $1 $FINALCONFIGPATH >>$CM_PATHCONFIG_DEFAULT
368  }  }
369    
370  #  #
# Line 372  Line 389 
389          echo $this: Building $TARGET.          echo $this: Building $TARGET.
390          unpack $2 $SRCDIR $1 $1          unpack $2 $SRCDIR $1 $1
391          cd $SRCDIR/$1          cd $SRCDIR/$1
392          ./build          # build it, but make sure we don't pick up some (unrelated)
393            # local path configuration...
394            CM_LOCAL_PATHCONFIG=/dev/null ./build
395          if [ -r $TARGETLOC ] ; then          if [ -r $TARGETLOC ] ; then
396              mv $TARGETLOC $HEAPDIR/$TARGET              mv $TARGETLOC $HEAPDIR/$TARGET
397              if [ ! -f $BINDIR/$1 ] ; then              if [ ! -f $BINDIR/$1 ] ; then
# Line 448  Line 467 
467  installdriver _run-sml .run-sml  installdriver _run-sml .run-sml
468  installdriver _link-sml .link-sml  installdriver _link-sml .link-sml
469  installdriver _ml-build ml-build  installdriver _ml-build ml-build
470    installdriver _ml-makedepend ml-makedepend
471    
472  #  #
473  # set some architecture dependent run-time system flags  # set some architecture dependent run-time system flags
# Line 504  Line 524 
524      $MAKE -f mk.$ARCH-$OPSYS $EXTRA_DEFS      $MAKE -f mk.$ARCH-$OPSYS $EXTRA_DEFS
525      if [ -x run.$ARCH-$OPSYS ]; then      if [ -x run.$ARCH-$OPSYS ]; then
526          mv run.$ARCH-$OPSYS $RUNDIR          mv run.$ARCH-$OPSYS $RUNDIR
527          # $MAKE MAKE=$MAKE clean          $MAKE MAKE=$MAKE clean
528      else      else
529          echo "$this: !!! Run-time system build failed for some reason."          echo "$this: !!! Run-time system build failed for some reason."
530          exit 1          exit 1
# Line 584  Line 604 
604          standalone ml-burg ML-Burg          standalone ml-burg ML-Burg
605          echo ml-burg $TOOLDIR >>$CM_PATHCONFIG_DEFAULT          echo ml-burg $TOOLDIR >>$CM_PATHCONFIG_DEFAULT
606          ;;          ;;
607          ml-nlffigen)
608            echo standalone ml-nlffigen ML-NLFFI-Gen >>$LATESTANDALONES
609            echo ml-nlffigen $TOOLDIR >>$CM_PATHCONFIG_DEFAULT
610            ;;
611        smlnj-lib)        smlnj-lib)
612          unpack "SML/NJ Library" $SRCDIR smlnj-lib smlnj-lib          unpack "SML/NJ Library" $SRCDIR smlnj-lib smlnj-lib
613    
# Line 617  Line 641 
641          unpack EXene $SRCDIR eXene eXene          unpack EXene $SRCDIR eXene eXene
642          reglib eXene.cm eXene          reglib eXene.cm eXene
643          ;;          ;;
644          ckit)
645            unpack "C-Kit" $ROOT ckit ckit
646            reglib ckit-lib.cm ../ckit/src
647            ;;
648          ml-nlffi-lib)
649            unpack "NLFFI Library" $SRCDIR ml-nlffi-lib ml-nlffi-lib
650            reglib memory.cm ml-nlffi-lib/memory
651            reglib c-int.cm ml-nlffi-lib/internals
652            reglib c.cm ml-nlffi-lib
653            ;;
654        doc)        doc)
655          unpack Doc $ROOT doc doc          unpack Doc $ROOT doc doc
656          cd $ROOT/doc          cd $ROOT/doc
# Line 644  Line 678 
678  fi  fi
679    
680  #  #
681  # Finally, move the libraries to their final locations...  # Move the libraries to their final locations...
682  #  #
683    
684  if [ -r $LIBMOVESCRIPT ] ; then  if [ -r $LIBMOVESCRIPT ] ; then
# Line 652  Line 686 
686      . $LIBMOVESCRIPT      . $LIBMOVESCRIPT
687  fi  fi
688    
689    #
690    # Build "late" standalone programs (i.e., those that must be built
691    # after libraries are already in place):
692    #
693    
694    if [ -r $LATESTANDALONES ] ; then
695        echo $this: Building late standalone programs.
696        . $LATESTANDALONES
697    fi
698    
699    #
700    # Finally, remove duplicate entries from pathconfig file...
701    #
702    if [ -f $CM_PATHCONFIG_DEFAULT ] ; then
703        cp $CM_PATHCONFIG_DEFAULT $PCEDITTMP
704        rm -f $CM_PATHCONFIG_DEFAULT
705        awk <$PCEDITTMP 'NF == 2 { mapping[$1] = $2 }
706    NF != 2 { print $0 }
707    END { for (i in mapping) print i, mapping[i] }' \
708          | sort >$CM_PATHCONFIG_DEFAULT
709    fi
710    
711  exit 0  exit 0

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

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