#!/bin/csh # ---------------------------------------------------------------------- # # cvs.setup # # Instructions for initial (fake) setup of SoftRelTools-based release # of FPCLTF (zoom) packages and their prerequisites. # # It is considered a fake setup because it will allow you to build # interconnected packages without having a real distribution area. # Therefore, many SRT commands will *not* work. # # *** IMPORTANT NOTE: # These instructions take the form of a C-shell script. You will need # to tailor its steps to reflect your situation and preferences. See # the numbered [1-5] inline commentary for directions and hints. # # Provenance found at file's end. # # ---------------------------------------------------------------------- # ---------- # Set up the environment (replace all ?'s): [1] # ---------- set DIST = ? # your root directory name for the zoom distribution setenv BFARCH ? # your architecture (eg, IRIX5) set EXP = ? # your experiment (eg, D0) # ---------- # Prepare CVS, compilers, and any other stuff you might need for use: # ---------- setenv CVSROOT cvsuser@cdfsga.fnal.gov:/usr/people/cvsuser/repository setup cvs if ( $BFARCH =~ *KCC ) then setup kai else setup gcc endif setup gtools # Any other setup cmds you may need should go here: [2] # ---------- # Initialize for package selection: # ---------- set ZMpkg ZMinc # initialize alias ZMsetup 'set ZMpkg = ($ZMpkg \!^); set ZMinc = ($ZMinc \!:2)' # ---------- # Noting the packages' respective prerequisites, uncomment the lines # corresponding to those packages you want: [3] # ---------- #ZMsetup ZMutility ZMutility # used by most packages #ZMsetup Exceptions Exceptions # used by many packages #ZMsetup CLHEP CLHEP # needed by HepTuple examples #ZMsetup PhysicsVectors PhysicsVectors # needed by HepTuple examples #ZMsetup HepTuple HepTuple #ZMsetup LinearAlgebra LinearAlgebra #ZMsetup ZMtools ZMtools # Any other packages you want go here, in the following form: [4] #ZMsetup YOUR_PACKAGE_NAME ITS_DIRECTORY_OF_HEADER_FILES # ---------- # This section is precautionary: nothing permanent will be done unless # you explicitly comment out (or remove) the following line to signify # that you have completed tailoring this script to your satisfaction: [5] # ---------- echo ${0}: incomplete tailoring -- correct and rerun; exit # ---------- # Create the distribution root and other directories required by # SoftRelTools, positioning ourselves at the root of the hierarchy: # ---------- if ( ! -d $DIST ) then mkdir $DIST # create the root of the hierarchy endif cd $DIST # and stay there! foreach F ( bin bin/${BFARCH} \ doc \ include \ lib lib/${BFARCH} \ man \ results \ tmp tmp/${BFARCH} \ ) if ( ! -d $F ) then mkdir $F # create required directory endif end # ---------- # Obtain current mandatory SoftRelTools package and ready it for use: # ---------- set SRT = SoftRelTools if ( -e $SRT/CVS ) then cvs update -P -d $SRT # refresh from repository else cvs co $SRT # start with fresh copy endif if ( -e include/$SRT ) then rm include/$SRT endif ln -s ../$SRT include/$SRT # connect the include directories touch ${DIST}/.current # create empty file echo $EXP > .experiment cp $SRT/GNUmakefile.top ${DIST}/GNUmakefile # install by hand to bootstrap gmake -k $SRT.all # now build the rest of SoftRelTools # ---------- # For each desired package, obtain its current version, make its # directory of public header files accessible, and build it: # ---------- foreach F ( $ZMpkg ) if ( -e $F/CVS ) then cvs update -P -d $F # refresh from repository else cvs co $F # start with fresh copy endif if ( -e include/$F ) then rm include/$F endif ln -s ../${F}/${ZMinc[1]} include/$F # connect the include directories if ( ! -d tmp/${BFARCH}/$F ) then mkdir tmp/${BFARCH}/$F # create package's work directory endif gmake -k ${F}.all # build the package shift ZMinc end # ---------- # Done; clean up and go home: # ---------- unset ZMpkg; unset ZMinc; unalias ZMsetup unset DIST ; unset EXP exit # ---------------------------------------------------------------------- # # Revision history: # 10-Jun-1997 WEB Initial draft, based on conversations with Alan # Jonckheere # 11-Jun-1997 WEB Updated with additional warnings and dire # imprecations, based on a review (by Alan) of the initial draft # 12-Jun-1997 WEB Create empty .current file via touch # 30-Jun-1997 WEB Define PKG with absolute pathname # 17-Jul-1997 MF This version is on the fnalu cluster under the # fpcltf/Pkg area and is used to prepare cvs to checkout the zoom # reference copies of our products: starting list is FixedTypes, # HepTuple, LinearAlgebra # 23-Jul-1997 WEB Added the omitted ln steps for FixedTypes and # LinearAlgebra packages' setup; interleaved the checkout and ln # steps for all packages to reduce likelihood of future accidental # omissions; updated commentary # 07-Aug-1997 WEB Corrected the ln information for FixedTypes # 04-Sep-1997 WEB Corrected the ln information for LinearAlgebra # 24-Sep-1997 WEB Added packages Utility and Exceptions # 08-Oct-1997 WEB The Utility package is now renamed ZMutility # 09-Oct-1997 WEB Added PhysicsVectors package; added the IMPORTANT # NOTE above; added csh invocation # 13-Oct-1997 WEB Added arguments to csh invocation; corrected the # name of the PhysicsVectors include directory # 14-Oct-1997 WEB Restructured and clarified directions for easier # customizing # 04-Nov-1997 WEB Insisted on fresh links, deleting any that exist # 05-Nov-1997 WEB Added another default directory to be created; # make packages one at a time (to insure correct order) rather than # all at once # 07-Nov-1997 WEB Refresh selected packages if they've already been # checked out # 11-Nov-1997 WEB Improved commentary; adjusted bootstrap steps # 17-Nov-1997 WEB Removed $(FTE) -- obviated by zoom.mk; renumbered # the tailoring steps; setup the right compiler & unsetup the wrong # compiler # 18-Nov-1997 WEB Added -k flag to gmake, to keep going in case of # errors # 19-Nov-1997 WEB Added -P, -d flags to cvs update, to handle any # new or newly-empty subdirectories # 05-Jan-1998 WEB Removed FixedTypes package option, since it's now # integrated within ZMutility. # 12-Jan-1998 WEB Use LinearAlgebra/LinearAlgebra rather than the # former LinearAlgebra/include directory # 19-Jan-1998 WEB Update prerequisites for PhysicsVectors # 25-Feb-1998 WEB Provide for new package ZMtools; accommodate # recent SRT change by installing $SRT/GNUmakefile.top instead of # $SRT/GNUmakefile.main # 22-May-1998 WEB Include setup for gtools; remove compiler unsetups # 29-Jun-1998 WEB Rearrange setups per dependencies # # ----------------------------------------------------------------------