Print

Print


Commit in SimDist/scripts on MAIN
slic.sh.in+2-11.20 -> 1.21
slic-ldpath.sh.in+8-221.3 -> 1.4
+10-23
2 modified files
fix ld path setup in slic run script

SimDist/scripts
slic.sh.in 1.20 -> 1.21
diff -u -r1.20 -r1.21
--- slic.sh.in	2 Aug 2011 19:20:17 -0000	1.20
+++ slic.sh.in	23 Aug 2011 22:35:35 -0000	1.21
@@ -41,7 +41,8 @@
 #export @OS_SHARED_LIBS_VAR@=$QT_LIB_DIR:$@OS_SHARED_LIBS_VAR@
 
 # Include the ldpath script in case shared libs were selected.
-. ${SIM_HOME}/scripts/slic-ldpath.sh ${SIM_HOME}
+export SIMDIST_HOME=$SIM_HOME
+. ${SIM_HOME}/scripts/slic-ldpath.sh
 
 # cygwin (adds .exe extension)
 if [ -n "$(uname | grep -i cygwin)" ]

SimDist/scripts
slic-ldpath.sh.in 1.3 -> 1.4
diff -u -r1.3 -r1.4
--- slic-ldpath.sh.in	12 Jul 2011 21:46:40 -0000	1.3
+++ slic-ldpath.sh.in	23 Aug 2011 22:35:35 -0000	1.4
@@ -3,37 +3,24 @@
 # This is a relocatable script for setting up the library load path for SimDist libraries
 # on multiple platforms (Linux, OSX, Cygwin).  It must be processed by SimDist's configure
 # to produce ./scripts/slic-ldpath.sh which can then be sourced on the user's machine.
-#
-# It tries to find the local SimDist installation using two ways...
-#
-# --Check for user setting of the SIMDIST_HOME variable.
-# --Check if SimDist root appears to be the current directory.
-#
-# If neither works, the load path won't be set and the script exits with an error message.
-# It does NOT call exit, as this would kill the user's shell if the script is included
-# or sourced.
+# The SIMDIST_HOME variable should be set before this script is included.  An error 
+# message is printed if the variable is not set.
 #
 # NOTE: The tricks used in ./scripts/slic.sh to find SimDist cannot be used here, 
 # because this script is included into the user environment rather than executed.
 #
 
-# Check for user setting of SIMDIST_HOME variable.
-if [ -n "${1}" ]; then
-    SIMDIST_HOME=$1
-else
-    # Check if in SimDist root area.
-    if [ -d ./packages/slic ]; then
-        SIMDIST_HOME=`pwd`
-    fi
-fi
-
 # Check that SIMDIST_HOME is setup and has a known sub-directory.  Messed up or incomplete
 # directory structure could get by this check, but it is probably good enough.
+if [ -z "${SIMDIST_HOME}" ]; then
+    echo "ERROR: Required SIMDIST_HOME variable is not set in environment."
+else
 if [ -d ${SIMDIST_HOME}/packages/slic ]; then
 
     echo "SIMDIST_HOME=${SIMDIST_HOME}"
 
     # Set library paths for packages.
+    # FIXME: This should probably happen from within configure rather than here.
     CLHEP_LIB_DIR=${SIMDIST_HOME}/packages/clhep/@CLHEP_VERSION@/lib
     G4_LIB_DIR=${SIMDIST_HOME}/packages/geant4/@GEANT4_VERSION@/lib/@G4SYSTEM@
     GDML_LIB_DIR=${SIMDIST_HOME}/packages/gdml/@GDML_VERSION@/CPPGDML/build/@G4SYSTEM@/lib
@@ -44,13 +31,11 @@
     HEPPID_LIB_DIR=${SIMDIST_HOME}/packages/heppdt/@[log in to unmask]
     SLIC_LIB_DIR=${SIMDIST_HOME}/packages/slic/@SLIC_VERSION@/lib
 
-    # FIXME: Correct Qt dir?
+    # FIXME: Is this the correct Qt dir?
     if [ "@QTHOME" != "" ]; then
         QT_LIB_DIR=@QTHOME@/lib
     fi
     
-    # FIXME: Variables with relative path set by configure would be better, e.g. CLHEP_LIB_RELDIR, etc.
-    
     # Set the platform's load path variable.
     unset @OS_SHARED_LIBS_VAR@
     export @OS_SHARED_LIBS_VAR@=${CLHEP_LIB_DIR}:${G4_LIB_DIR}:${GDML_LIB_DIR}:${XERCES_LIB_DIR}:${LCIO_LIB_DIR}:${LCDD_LIB_DIR}:${HEPPDT_LIB_DIR}:${HEPPID_LIB_DIR}:${SLIC_LIB_DIR}:${QT_LIB_DIR}
@@ -59,3 +44,4 @@
 else
     echo "ERROR: $SIMDIST_HOME doesn't appear to point to a valid SimDist installation!"
 fi
+fi
CVSspam 0.2.8