case $CONFIG in '') if test -f config.sh; then TOP=.; elif test -f ../config.sh; then TOP=..; elif test -f ../../config.sh; then TOP=../..; elif test -f ../../../config.sh; then TOP=../../..; elif test -f ../../../../config.sh; then TOP=../../../..; else echo "Can't find config.sh."; exit 1 fi . $TOP/config.sh ;; esac : This forces SH files to create target in same directory as SH file. : This is so that make depend always knows where to find SH derivatives. case "$0" in */*) cd `expr X$0 : 'X\(.*\)/'` ;; esac #echo "Extracting env.csh (with variable substitutions)" : This section of the file will have variable substitutions done on it. : Move anything that needs config subs from !NO!SUBS! section to !GROK!THIS!. : Protect any dollar signs and backticks that you do not want interpreted : by putting a backslash in front. You may delete these comments. $spitshell >env.csh <>env.csh <<'!NO!SUBS!' #+ # # G4WORKDIR # if ( ${?G4WORKDIR} ) then echo "In your environment you have the G4WORKDIR=$G4WORKDIR" else # Check for Windows! if ( "X$G4SYSTEM" == "XWIN32-VC" || "X$G4SYSTEM" == "XWIN32-VC7" ) then echo "G4WORKDIR will be set to c:/geant4 (in "native" Windows syntax)." setenv G4WORKDIR "c:/geant4" else # if Unix echo "G4WORKDIR will be set to HOME/geant4=$HOME/geant4" setenv G4WORKDIR $HOME/geant4 endif endif # # *NIX Shared Libraries # If we built Geant4 with shared libraries, we need to add the Gean4 # library directory to (DY)LD_LIBRARY_PATH. # In all cases, external shared library directories should be added to # (DY)LD_LIBRARY_PATH if ( "X$G4SYSTEM" != "XDarwin-g++" ) then if ( ${?LD_LIBRARY_PATH} ) then if ( ${?G4LIB_BUILD_SHARED} ) then setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${G4LIB}/${G4SYSTEM} endif setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${CLHEP_LIB_DIR} if ( ${?G4LIB_BUILD_GDML} ) then setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${XERCESCROOT}/lib endif else if ( ${?G4LIB_BUILD_SHARED} ) then setenv LD_LIBRARY_PATH ${G4LIB}/${G4SYSTEM} setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${CLHEP_LIB_DIR} else setenv LD_LIBRARY_PATH ${CLHEP_LIB_DIR} endif if ( ${?G4LIB_BUILD_GDML} ) then setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${XERCESCROOT}/lib endif endif else # # Darwin Shared Libraries # we repeat the above logic, but for DYLD_LIBRARY_PATH # if ( ${?DYLD_LIBRARY_PATH} ) then if ( ${?G4LIB_BUILD_SHARED} ) then setenv DYLD_LIBRARY_PATH ${DYLD_LIBRARY_PATH}:${G4LIB}/${G4SYSTEM} endif setenv DYLD_LIBRARY_PATH ${DYLD_LIBRARY_PATH}:${CLHEP_LIB_DIR} if ( ${?G4LIB_BUILD_GDML} ) then setenv DYLD_LIBRARY_PATH ${DYLD_LIBRARY_PATH}:${XERCESCROOT}/lib endif else if ( ${?G4LIB_BUILD_SHARED} ) then setenv DYLD_LIBRARY_PATH ${G4LIB}/${G4SYSTEM} setenv DYLD_LIBRARY_PATH ${DYLD_LIBRARY_PATH}:${CLHEP_LIB_DIR} else setenv DYLD_LIBRARY_PATH ${CLHEP_LIB_DIR} endif if ( ${?G4LIB_BUILD_GDML} ) then setenv DYLD_LIBRARY_PATH ${DYLD_LIBRARY_PATH}:${XERCESCROOT}/lib endif endif endif # # Warning about LD_LIBRARY_PATH # echo '' if ( ${?G4LIB_BUILD_SHARED} ) then if ( "X$G4SYSTEM" == "XDarwin-g++" ) then echo 'DYLD_LIBRARY_PATH is set to include CLHEP and Geant4 libraries. ' else echo 'LD_LIBRARY_PATH is set to include CLHEP and Geant4 libraries. ' endif else if ( "X$G4SYSTEM" == "XDarwin-g++" ) then echo 'DYLD_LIBRARY_PATH is set to include CLHEP libraries. ' else echo 'LD_LIBRARY_PATH is set to include CLHEP libraries. ' endif endif echo 'NOTE : you should verify that the correct path for the CLHEP library' echo '' echo ${CLHEP_BASE_DIR}/lib echo '' echo 'is included in the dynamic library search path ahead of any other' echo 'installations of CLHEP on your system that may be referenced by this' echo 'path.' echo '' # # For BIN # setenv PATH ${PATH}:${G4WORKDIR}/bin/${G4SYSTEM} !NO!SUBS! chmod 755 env.csh $eunicefix env.csh