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 1252, Fri Jul 5 15:58:01 2002 UTC revision 1310, Tue Mar 11 23:54:58 2003 UTC
# Line 43  Line 43 
43   ml-burg \   ml-burg \
44   ml-nlffigen \   ml-nlffigen \
45   smlnj-lib \   smlnj-lib \
46     mlrisc \
47   cml \   cml \
48   cml-lib \   cml-lib \
49   eXene \   eXene \
# Line 474  Line 475 
475      RELNAME=$2      RELNAME=$2
476      LIBNAME='$'${ANCHOR}/${RELNAME}      LIBNAME='$'${ANCHOR}/${RELNAME}
477      ADIR=${SRCDIR}/$3      ADIR=${SRCDIR}/$3
478        if [ $# -gt 3 ] ; then
479            FINALANCHOR=$4
480        else
481            FINALANCHOR=$ANCHOR
482        fi
483      RELDIR=`dirname $RELNAME`      RELDIR=`dirname $RELNAME`
484      RELBASE=`basename $RELNAME`      RELBASE=`basename $RELNAME`
485      if [ x$RELDIR = x. ] ; then      if [ x$RELDIR = x. ] ; then
# Line 484  Line 490 
490      RELLOC=${RELDIR}/CM/${ARCH}-unix/${RELBASE}      RELLOC=${RELDIR}/CM/${ARCH}-unix/${RELBASE}
491      SRCFINALLOC=${ADIR}${RELLOC}      SRCFINALLOC=${ADIR}${RELLOC}
492      if [ x$MOVE_LIBRARIES = xtrue ] ; then      if [ x$MOVE_LIBRARIES = xtrue ] ; then
493          FINALLOC=${LIBDIR}/${ANCHOR}${RELLOC}          FINALLOC=${LIBDIR}/${FINALANCHOR}${RELLOC}
494          FINALCONFIGPATH=${ANCHOR}          FINALCONFIGPATH=${FINALANCHOR}
495      else      else
496          FINALLOC=${SRCFINALLOC}          FINALLOC=${SRCFINALLOC}
497          FINALCONFIGPATH=${ADIR}          FINALCONFIGPATH=${ADIR}
# Line 501  Line 507 
507              echo movelib ${SRCFINALLOC} ${FINALLOC} >>${LIBMOVESCRIPT}              echo movelib ${SRCFINALLOC} ${FINALLOC} >>${LIBMOVESCRIPT}
508          fi          fi
509      fi      fi
510      echo ${ANCHOR} ${FINALCONFIGPATH} >>${CM_PATHCONFIG}      echo ${FINALANCHOR} ${FINALCONFIGPATH} >>${CM_PATHCONFIG}
511    }
512    
513    #
514    # Function for adding anchor bindings to LOCALPATHCONFIG
515    #
516    # $1 - anchor name
517    # $2 - directory relative to ROOT corresponding to $1
518    localanchor() {
519        echo $1 ${ROOT}/$2 >>${LOCALPATHCONFIG}
520  }  }
521    
522  #  #
# Line 557  Line 572 
572  done  done
573    
574  #  #
 # 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  
   
 #  
575  # Function to install a "driver" script...  # Function to install a "driver" script...
576  #   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,
577  #   BINDIR, and VERSION variables to use.  #   BINDIR, and VERSION variables to use.
# Line 607  Line 598 
598  #   fi  #   fi
599  }  }
600    
601    #
602    # install the script that tests architecture and os...
603    #
604    installdriver _arch-n-opsys .arch-n-opsys
605    
606    #
607    # run it to figure out what architecture and os we are using, define
608    # corresponding variables...
609    #
610    ARCH_N_OPSYS=`$BINDIR/.arch-n-opsys`
611    if [ "$?" != "0" ]; then
612        echo "$this: !!! Script $BINDIR/.arch-n-opsys fails on this machine."
613        echo "$this: !!! You must patch this by hand and repeat the installation."
614        exit 2
615    else
616        vsay $this: Script $BINDIR/.arch-n-opsys reports $ARCH_N_OPSYS.
617    fi
618    eval $ARCH_N_OPSYS
619    
620    #
621    # now install all the other driver scripts...
622    #
623  installdriver _run-sml .run-sml  installdriver _run-sml .run-sml
624  installdriver _link-sml .link-sml  installdriver _link-sml .link-sml
625  installdriver _ml-build ml-build  installdriver _ml-build ml-build
# Line 800  Line 813 
813          unpack "CM source code" $SRCDIR cm cm          unpack "CM source code" $SRCDIR cm cm
814          reglib pgraph-util.cm pgraph-util.cm cm/pgraph          reglib pgraph-util.cm pgraph-util.cm cm/pgraph
815          ;;          ;;
816          mlrisc)
817            unpack "MLRISC Library" $SRCDIR MLRISC MLRISC
818            localanchor Control.cm lib/SMLNJ-MLRISC
819            localanchor Lib.cm lib/SMLNJ-MLRISC
820            localanchor Visual.cm lib/SMLNJ-MLRISC
821            localanchor MLRISC.cm lib/SMLNJ-MLRISC
822            localanchor MLTREE.cm lib/SMLNJ-MLRISC
823            localanchor Graphs.cm lib/SMLNJ-MLRISC
824            localanchor IA32.cm lib/SMLNJ-MLRISC
825            localanchor Peephole.cm src/MLRISC/cm
826            reglib OTHER-MLRISC RA.cm MLRISC/cm SMLNJ-MLRISC
827            reglib OTHER-MLRISC Peephole.cm MLRISC/cm SMLNJ-MLRISC
828            reglib OTHER-MLRISC IA32-Peephole.cm MLRISC/cm SMLNJ-MLRISC
829            ;;
830        mlrisc-tools)        mlrisc-tools)
831          unpack "MLRISC Tools Library" $SRCDIR MLRISC MLRISC          unpack "MLRISC Tools Library" $SRCDIR MLRISC MLRISC
832          reglib mlrisc-tools pp.cm MLRISC/Tools          reglib mlrisc-tools pp.cm MLRISC/Tools

Legend:
Removed from v.1252  
changed lines
  Added in v.1310

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