In the following examples, the CERNLIB tree is available via AFS. The procedure is identical for the case when the CERNLIB tree is mounted via NFS .
Accessing the CERNLIB tree via AFS
\footnotesize{ zfatal:/hepdb/cdchorus (185) ls -l /cern total 0 lrwxrwxrwx 1 root system 26 Dec 7 21:02 93c -> /afs/cern.ch/asis/cern/93c lrwxrwxrwx 1 root system 26 Dec 7 21:02 93d -> /afs/cern.ch/asis/cern/93d lrwxrwxrwx 1 root system 26 Dec 7 21:02 94a -> /afs/cern.ch/asis/cern/94a lrwxrwxrwx 1 root system 26 Dec 7 21:02 WWW -> /afs/cern.ch/asis/cern/WWW lrwxrwxrwx 1 root system 26 Dec 7 21:02 cmz -> /afs/cern.ch/asis/cern/cmz lrwxrwxrwx 1 root system 26 Dec 7 21:02 mad -> /afs/cern.ch/asis/cern/mad lrwxrwxrwx 1 root system 26 Dec 7 21:02 man -> /afs/cern.ch/asis/cern/man lrwxrwxrwx 1 root system 26 Dec 7 21:02 new -> /afs/cern.ch/asis/cern/new lrwxrwxrwx 1 root system 26 Dec 7 21:02 old -> /afs/cern.ch/asis/cern/old lrwxrwxrwx 1 root system 29 Dec 7 21:02 patchy -> /afs/cern.ch/asis/cern/patchy lrwxrwxrwx 1 root system 28 Dec 7 21:02 phigs -> /afs/cern.ch/asis/cern/phigs lrwxrwxrwx 1 root system 26 Dec 7 21:02 pro -> /afs/cern.ch/asis/cern/pro lrwxrwxrwx 1 root system 28 Dec 7 21:02 share -> /afs/cern.ch/asis/cern/share }
Let us assume that we wish to reinstall the CERNLIB software in the /cernlib/cern tree. We first create these directories, and then a subdirectory for the version that we wish to install. We procede as follows:
Setting up the directory tree
mkdir /cernlib/cern mkdir /cernlib/cern/93d mkdir /cernlib/cern/93d/bin mkdir /cernlib/cern/93d/lib mkdir /cernlib/cern/93d/log mkdir /cernlib/cern/93d/src mkdir /cernlib/cern/93d/doc
We now set up a number of links.
Creating links into the AFS tree
cd /cernlib/cern/93d ln -s /cern/93d/include include ln -s /cern/93d/mgr mgr cd src ln -s /cern/93d/src/car car ln -s /cern/93d/src/cmz cmz ln -s car cra
In fact, only the links for the car and cra directories are required for what follows.
We now add the following commands to our profile.
Tailoring the .profile of the cernlib account
PATH=/cern/pro/bin:$PATH; export PATH export CERN=/cernlib/cern export CERN_LEVEL=93d export PLISTA=DEV . $CERN/$CERN_LEVEL/mgr/plienv.sh
We then reexecute the .profile and switch to the CERN manager directory.
Preparing to build the CERN software
. .profile cd $CERN/$CERN_LEVEL/mgr
We can now build the complete CERN software by typing make all.
Building the CERN software
make -n all ... makepack -p kerngen makepack -s -c kerngen ... makepack -s -c kernasw makepack -l kernlib makepack -p cspack makepack -s cspack makepack -l packlib -c cspack ... makepack -p isajetd rm -r /cernlib/cern/93d/src/cfs/isajetd makepack -p pdflibd rm -r /cernlib/cern/93d/src/cfs/pdflibd
Various components can be built using the syntax make target. Thus, to build the PAW modules one would type make paw. As the standard Unix make is employed, all the dependancies are known and intermediate components only rebuilt if required.
The following extract from the makefile indicates which components can be rebuilt separately or together.
Extract from cernlib makefile
# ********************************************************************** # Make definitions * # ********************************************************************** # ====================================================================== # >>> General makes # ====================================================================== # all: cernset products all: cernset cernset: cernlibs cernpgm userpgm mclibs mcdoc cernlibs: kernlib packlib mathlib graflibs pawlib phtools cernpgm: dzedit fatset kuipset paw rzconv flop tree telnetg \\ zftp pawserv zserv higzconv f2h hepdbset umlog userpgm: garfield poisson mclibs: ariadne cojets eurodec fritiof herwig isajet \\ jetset lepto pdflib photos mcdoc: cojetsd eurodecd fritiofd herwigd isajetd jetsetd \\ pdflibd photosd pythiad shrlibs: scernlib smathlib sgraflib sgeant products: cmz gks historian nag # ====================================================================== # >>> Basic Libraries # ====================================================================== kernlib: kernlib.a packlib: packlib.a mathlib: mathlib.a phtools: phtools.a graflibs: graflib grafX11 grafGKS graflib: graflib.a grafX11: grafX11.a grafGKS: grafGKS.a grafDGKS: grafDGKS.a grafGL: grafGL.a grafGPR: grafGPR.a pawlib: pawlib.a scernlib: scernlib.a smathlib: smathlib.a sgraflib: sgraflib.a kernlib.a: $(LIB)/libkernlib.a packlib.a: $(LIB)/libpacklib.a mathlib.a: $(LIB)/libmathlib.a phtools.a: $(LIB)/libphtools.a graflib.a: $(LIB)/libgraflib.a grafX11.a: $(LIB)/libgrafX11.a grafGKS.a: $(LIB)/libgrafGKS.a grafDGKS.a: $(LIB)/libgrafDGKS.a grafGL.a: $(LIB)/libgrafGL.a grafGPR.a: $(LIB)/libgrafGPR.a pawlib.a: $(LIB)/libpawlib.a scernlib.a: $(LIB)/scernlib.a smathlib.a: $(LIB)/smathlib.a sgraflib.a: $(LIB)/sgraflib.a