Introducing the "cernlib" Command in Unix
Gunter Folger CN/ASD
Since release 93d of the CERN Program Library the cernlib command is available also in UNIX. The cernlib script is in /cern/pro/bin. The usage of cernlib in UNIX is similar to VM and VAX.
cernlib can be used in two ways, either directly in the compile/link command or to define an environment variable. Assuming that f77 is the link command, the following will link a user program with packlib, the X11 version of graflib, and all the system libraries needed (please note that the cernlib command must be given between two backquotes, or grave accent marks() as for any other UNIX command substitution):
f77 your.o `cernlib graflib`
One can also set up an environment variable; this could be done in the login procedure. Depending on the shell in use the syntax is
CERNLIB=`cernlib graflib`; export CERNLIB
setenv CERNLIB "`cernlib graflib`"
f77 your.o $CERNLIB
For a full description of options available consult the man page for cernlib. The man pages for CERN Program library tools are kept in /cern/man. To have access to this directory through the man command, add this directory to your MANPATH, or, for most UNIX systems, you can also type
man -M /cern/man cernlib.
Should you have further questions, comments, suggestions for improvement please send an e-mail to email@example.com.