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 1074, Fri Feb 15 22:17:39 2002 UTC revision 1282, Thu Oct 17 13:07:53 2002 UTC
# Line 95  Line 95 
95  require() {  require() {
96      require_who=$1      require_who=$1
97      shift      shift
98        if isnotin ${require_who} ${TARGETS} ; then
99            :
100        else
101      for required_x in "$@" ; do      for required_x in "$@" ; do
102          if isnotin ${required_x} ${TARGETS} ; then          if isnotin ${required_x} ${TARGETS} ; then
103              echo "Including ${required_x} (needed by ${require_who})."              echo "Including ${required_x} (needed by ${require_who})."
# Line 102  Line 105 
105              CHANGED=true              CHANGED=true
106          fi          fi
107      done      done
108        fi
109  }  }
110    
111  onepass() {  onepass() {
# Line 145  Line 149 
149  #  #
150  MAKE=make  MAKE=make
151    
 #  
 # Make sure we don't have any unpleasant surprises due to the installing  
 # user's process environment:  
 #  
 unset CM_PATHCONFIG  
   
152  SHELL=/bin/sh  SHELL=/bin/sh
153  vsay $this: Using shell $SHELL.  vsay $this: Using shell $SHELL.
154    
# Line 206  Line 204 
204  #  #
205  # set the CM configuration variables (these are environment variables  # set the CM configuration variables (these are environment variables
206  # that will be queried by the bootstrap code)  # that will be queried by the bootstrap code)
207  # Especially important is CM_PATHCONFIG_DEFAULT.  # Especially important is CM_PATHCONFIG.
208  #  #
209  CM_PATHCONFIG_DEFAULT=$LIBDIR/pathconfig  CM_PATHCONFIG=$LIBDIR/pathconfig
210  export CM_PATHCONFIG_DEFAULT  export CM_PATHCONFIG
211    
212  #  #
213  # the release version that we are installing  # the release version that we are installing
# Line 270  Line 268 
268      vsay $this: Fetching $1 from $3. Please stand by...      vsay $this: Fetching $1 from $3. Please stand by...
269      fetched=no      fetched=no
270      for base in $2 $VERSION-$2 ; do      for base in $2 $VERSION-$2 ; do
271          for ext in tar.gz tgz tar.Z tz tar tar.bz2 ; do          for ext in tgz tar.gz tar.Z tz tar tar.bz2 ; do
272              try=$base.$ext              try=$base.$ext
273              vsay $this: Trying $try ...              vsay $this: Trying $try ...
274              if $getter $3/$try $ROOT/$try ; then              if $getter $3/$try $ROOT/$try ; then
# Line 395  Line 393 
393  # The variable $tryfetch is used to make sure this happens only once.  # The variable $tryfetch is used to make sure this happens only once.
394  fetch_n_unpack() {  fetch_n_unpack() {
395      cd $2      cd $2
396      if unarchive "$1" $4.tar.gz un_tar_gz ||      if unarchive "$1" $4.tgz un_tar_gz ||
397         unarchive "$1" $4.tgz un_tar_gz ||         unarchive "$1" $4.tar.gz un_tar_gz ||
398         unarchive "$1" $4.tar.Z un_tar_Z ||         unarchive "$1" $4.tar.Z un_tar_Z ||
399         unarchive "$1" $4.tar un_tar ||         unarchive "$1" $4.tar un_tar ||
400         unarchive "$1" $4.tar.bz2 un_tar_bz2 ||         unarchive "$1" $4.tar.bz2 un_tar_bz2 ||
# Line 503  Line 501 
501              echo movelib ${SRCFINALLOC} ${FINALLOC} >>${LIBMOVESCRIPT}              echo movelib ${SRCFINALLOC} ${FINALLOC} >>${LIBMOVESCRIPT}
502          fi          fi
503      fi      fi
504      echo ${ANCHOR} ${FINALCONFIGPATH} >>${CM_PATHCONFIG_DEFAULT}      echo ${ANCHOR} ${FINALCONFIGPATH} >>${CM_PATHCONFIG}
505  }  }
506    
507  #  #
# Line 559  Line 557 
557  done  done
558    
559  #  #
 # install the script that tests the architecture, and make sure that it works  
 #  
 if [ -x $BINDIR/.arch-n-opsys ]; then  
     vsay $this: 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  
         complain "$this: !!! Installation of $BINDIR/.arch-n-opsys failed."  
     fi  
 fi  
   
 ARCH_N_OPSYS=`$BINDIR/.arch-n-opsys`  
 if [ "$?" != "0" ]; then  
     echo "$this: !!! Script $BINDIR/.arch-n-opsys fails on this machine."  
     echo "$this: !!! You must patch this by hand and repeat the installation."  
     exit 2  
 else  
     vsay $this: Script $BINDIR/.arch-n-opsys reports $ARCH_N_OPSYS.  
 fi  
 eval $ARCH_N_OPSYS  
   
 #  
560  # Function to install a "driver" script...  # Function to install a "driver" script...
561  #   This takes care of patching the source of the script with the SHELL,  #   This takes care of patching the source of the script with the SHELL,
562  #   BINDIR, and VERSION variables to use.  #   BINDIR, and VERSION variables to use.
# Line 609  Line 583 
583  #   fi  #   fi
584  }  }
585    
586    #
587    # install the script that tests architecture and os...
588    #
589    installdriver _arch-n-opsys .arch-n-opsys
590    
591    #
592    # run it to figure out what architecture and os we are using, define
593    # corresponding variables...
594    #
595    ARCH_N_OPSYS=`$BINDIR/.arch-n-opsys`
596    if [ "$?" != "0" ]; then
597        echo "$this: !!! Script $BINDIR/.arch-n-opsys fails on this machine."
598        echo "$this: !!! You must patch this by hand and repeat the installation."
599        exit 2
600    else
601        vsay $this: Script $BINDIR/.arch-n-opsys reports $ARCH_N_OPSYS.
602    fi
603    eval $ARCH_N_OPSYS
604    
605    #
606    # now install all the other driver scripts...
607    #
608  installdriver _run-sml .run-sml  installdriver _run-sml .run-sml
609  installdriver _link-sml .link-sml  installdriver _link-sml .link-sml
610  installdriver _ml-build ml-build  installdriver _ml-build ml-build
# Line 697  Line 693 
693              cd $ROOT/$BOOT_FILES              cd $ROOT/$BOOT_FILES
694              for anchor in * ; do              for anchor in * ; do
695                  if [ -d $anchor ] ; then                  if [ -d $anchor ] ; then
696                      echo $anchor $anchor >>$CM_PATHCONFIG_DEFAULT                      echo $anchor $anchor >>$CM_PATHCONFIG
697                      move $anchor $LIBDIR/$anchor                      move $anchor $LIBDIR/$anchor
698                  fi                  fi
699              done              done
# Line 735  Line 731 
731          ;;          ;;
732        ml-yacc)        ml-yacc)
733          standalone ml-yacc ML-Yacc src          standalone ml-yacc ML-Yacc src
734          echo ml-yacc $TOOLDIR >>$CM_PATHCONFIG_DEFAULT          echo ml-yacc $TOOLDIR >>$CM_PATHCONFIG
735          ;;          ;;
736        ml-lex)        ml-lex)
737          standalone ml-lex ML-Lex          standalone ml-lex ML-Lex
738          echo ml-lex $TOOLDIR >>$CM_PATHCONFIG_DEFAULT          echo ml-lex $TOOLDIR >>$CM_PATHCONFIG
739          ;;          ;;
740        ml-burg)        ml-burg)
741          standalone ml-burg ML-Burg          standalone ml-burg ML-Burg
742          echo ml-burg $TOOLDIR >>$CM_PATHCONFIG_DEFAULT          echo ml-burg $TOOLDIR >>$CM_PATHCONFIG
743          ;;          ;;
744        ml-nlffigen)        ml-nlffigen)
745          echo standalone ml-nlffigen ML-NLFFI-Gen >>$LATESTANDALONES          echo standalone ml-nlffigen ML-NLFFI-Gen >>$LATESTANDALONES
746          echo ml-nlffigen $TOOLDIR >>$CM_PATHCONFIG_DEFAULT          echo ml-nlffigen $TOOLDIR >>$CM_PATHCONFIG
747          ;;          ;;
748        smlnj-lib)        smlnj-lib)
749          unpack "SML/NJ Library" $SRCDIR smlnj-lib smlnj-lib          unpack "SML/NJ Library" $SRCDIR smlnj-lib smlnj-lib
# Line 759  Line 755 
755              #reglib html-lib.cm html-lib.cm smlnj-lib/HTML              #reglib html-lib.cm html-lib.cm smlnj-lib/HTML
756          # ... and don't make the PP library ...          # ... and don't make the PP library ...
757              #reglib pp-lib.cm pp-lib.cm smlnj-lib/PP              #reglib pp-lib.cm pp-lib.cm smlnj-lib/PP
758            # ... and don't make the controls library ...
759                #reglib controls-lib.cm controls-lib.cm smlnj-lib/Controls
760          # make the Unix library          # make the Unix library
761              reglib unix-lib.cm unix-lib.cm smlnj-lib/Unix              reglib unix-lib.cm unix-lib.cm smlnj-lib/Unix
762          # make the INet library          # make the INet library
# Line 792  Line 790 
790          ;;          ;;
791        ml-nlffi-lib)        ml-nlffi-lib)
792          unpack "NLFFI Library" $SRCDIR ml-nlffi-lib ml-nlffi-lib          unpack "NLFFI Library" $SRCDIR ml-nlffi-lib ml-nlffi-lib
793          reglib memory.cm memory.cm ml-nlffi-lib/memory          reglib c memory/memory.cm ml-nlffi-lib
794          reglib c-int.cm c-int.cm ml-nlffi-lib/internals          reglib c internals/c-int.cm ml-nlffi-lib
795          reglib c.cm c.cm ml-nlffi-lib          reglib c c.cm ml-nlffi-lib
796          ;;          ;;
797        pgraph-util)        pgraph-util)
798          unpack "CM source code" $SRCDIR cm cm          unpack "CM source code" $SRCDIR cm cm
# Line 812  Line 810 
810        nowhere)        nowhere)
811          unpack "MLRISC Tools Library" $SRCDIR MLRISC MLRISC          unpack "MLRISC Tools Library" $SRCDIR MLRISC MLRISC
812          echo standalone nowhere NoWhere . MLRISC/Tools >>$LATESTANDALONES          echo standalone nowhere NoWhere . MLRISC/Tools >>$LATESTANDALONES
813          echo nowhere $TOOLDIR >>$CM_PATHCONFIG_DEFAULT          echo nowhere $TOOLDIR >>$CM_PATHCONFIG
814          ;;          ;;
815        doc)        doc)
816          echo Package doc is currently unavailable.          echo Package doc is currently unavailable.
# Line 862  Line 860 
860  #  #
861  # Finally, remove duplicate entries from pathconfig file...  # Finally, remove duplicate entries from pathconfig file...
862  #  #
863  if [ -f $CM_PATHCONFIG_DEFAULT ] ; then  if [ -f $CM_PATHCONFIG ] ; then
864      cp $CM_PATHCONFIG_DEFAULT $PCEDITTMP      cp $CM_PATHCONFIG $PCEDITTMP
865      rm -f $CM_PATHCONFIG_DEFAULT      rm -f $CM_PATHCONFIG
866      awk <$PCEDITTMP 'NF == 2 { mapping[$1] = $2 }      awk <$PCEDITTMP 'NF == 2 { mapping[$1] = $2 }
867  NF != 2 { print $0 }  NF != 2 { print $0 }
868  END { for (i in mapping) print i, mapping[i] }' \  END { for (i in mapping) print i, mapping[i] }' \
869        | sort >$CM_PATHCONFIG_DEFAULT        | sort >$CM_PATHCONFIG
870  fi  fi
871    
872  exit 0  exit 0

Legend:
Removed from v.1074  
changed lines
  Added in v.1282

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