| 1 | #!/bin/csh -f
|
|---|
| 2 |
|
|---|
| 3 | #
|
|---|
| 4 | # File produced by the obuild tool version 1.0
|
|---|
| 5 | # for the package snovis with version v1r0.
|
|---|
| 6 | #
|
|---|
| 7 |
|
|---|
| 8 | #////////////////////////////////////////////////
|
|---|
| 9 | # Usage :
|
|---|
| 10 | # csh> source setup.csh
|
|---|
| 11 | #////////////////////////////////////////////////
|
|---|
| 12 |
|
|---|
| 13 | #set verbose # uncomment this line to have full verbosity.
|
|---|
| 14 |
|
|---|
| 15 | #////////////////////////////////////////////////
|
|---|
| 16 | # Set the absolute path of this package.
|
|---|
| 17 | # If in the below line there is the keyword :
|
|---|
| 18 | #
|
|---|
| 19 | # @@absolute_dir@@
|
|---|
| 20 | #
|
|---|
| 21 | # then the package had not been installed.
|
|---|
| 22 | #
|
|---|
| 23 | # Someone has to replace @@absolute_dir@@
|
|---|
| 24 | # by the absolute path of the package.
|
|---|
| 25 | # By "absolute path of the package", we mean that
|
|---|
| 26 | # if the obuild directory of the package is
|
|---|
| 27 | # found under :
|
|---|
| 28 | # some_path/pack/vers/obuild
|
|---|
| 29 | # then the "absolute path of the package" is :
|
|---|
| 30 | # some_path/pack/vers
|
|---|
| 31 | #
|
|---|
| 32 | # This replacement can be done on the setup
|
|---|
| 33 | # scripts of the package by using the sh/build
|
|---|
| 34 | # with the -i option.
|
|---|
| 35 | #
|
|---|
| 36 | # This replacement can be done recursively
|
|---|
| 37 | # on the setups of the used packages by using
|
|---|
| 38 | # the sh/build script with the -bci option
|
|---|
| 39 | # ("bci" for broadcast install).
|
|---|
| 40 | #
|
|---|
| 41 | #////////////////////////////////////////////////
|
|---|
| 42 |
|
|---|
| 43 | set obuild_snovis_path="@@absolute_dir@@"
|
|---|
| 44 |
|
|---|
| 45 |
|
|---|
| 46 | if ( "${obuild_snovis_path}" == '@@absolute_dir@@' ) then
|
|---|
| 47 | echo ' The package snovis had not been installed.'
|
|---|
| 48 | echo ''
|
|---|
| 49 | echo ' In the file :'
|
|---|
| 50 | echo ' snovis/<vers>/obuild/setup.csh'
|
|---|
| 51 | echo ' someone has to replace '
|
|---|
| 52 | echo ' @@absolute_dir@@'
|
|---|
| 53 | echo ' by the absolute path of the package.'
|
|---|
| 54 | echo ' By "absolute path of the package", we mean that'
|
|---|
| 55 | echo ' if the obuild directory of the package is found under :'
|
|---|
| 56 | echo ' some_path/pack/vers/obuild'
|
|---|
| 57 | echo ' then the "absolute path of the package" is :'
|
|---|
| 58 | echo ' some_path/pack/vers'
|
|---|
| 59 | echo ''
|
|---|
| 60 | echo ' If having the write access, this replacement can be done'
|
|---|
| 61 | echo ' on the setup scripts of the package by using the sh/build'
|
|---|
| 62 | echo ' with the -i option. This replacement can be done recursively'
|
|---|
| 63 | echo ' on the setups of the used packages by using the sh/build script'
|
|---|
| 64 | echo ' with the -bci option ("bci" for broadcast install).'
|
|---|
| 65 | echo ''
|
|---|
| 66 | exit
|
|---|
| 67 | endif
|
|---|
| 68 |
|
|---|
| 69 | if ( $?OBUILD_PLATFORM ) then
|
|---|
| 70 | if ( "${OBUILD_PLATFORM}" == "" ) then
|
|---|
| 71 | set obuild_platform=`uname`
|
|---|
| 72 | else
|
|---|
| 73 | set obuild_platform=${OBUILD_PLATFORM}
|
|---|
| 74 | endif
|
|---|
| 75 | else
|
|---|
| 76 | set obuild_platform=`uname`
|
|---|
| 77 | endif
|
|---|
| 78 |
|
|---|
| 79 | if ( "${obuild_platform}" == "" ) then
|
|---|
| 80 | echo "obuild_platform variable not defined."
|
|---|
| 81 | exit
|
|---|
| 82 | endif
|
|---|
| 83 |
|
|---|
| 84 | if ( $?OBUILD_DIR_BIN ) then
|
|---|
| 85 | if ( "${OBUILD_DIR_BIN}" == "" ) then
|
|---|
| 86 | set obuild_dir_bin=${obuild_platform}_obuild
|
|---|
| 87 | else
|
|---|
| 88 | set obuild_dir_bin=${OBUILD_DIR_BIN}
|
|---|
| 89 | endif
|
|---|
| 90 | else
|
|---|
| 91 | set obuild_dir_bin=${obuild_platform}_obuild
|
|---|
| 92 | endif
|
|---|
| 93 |
|
|---|
| 94 | if ( "${obuild_dir_bin}" == "" ) then
|
|---|
| 95 | echo "obuild_dir_bin variable not defined."
|
|---|
| 96 | exit
|
|---|
| 97 | endif
|
|---|
| 98 |
|
|---|
| 99 | if ( ! -e "${obuild_snovis_path}/${obuild_dir_bin}/obuild_platform" ) then
|
|---|
| 100 | if ( ! -e "${obuild_snovis_path}/obuild/cpp/obuild_platform.cpp" ) then
|
|---|
| 101 | echo "Program source obuild_platform.cpp not found."
|
|---|
| 102 | exit
|
|---|
| 103 | endif
|
|---|
| 104 | if ( $?obuild_cxx_command ) then
|
|---|
| 105 | if ( "${obuild_cxx_command}" == "" ) then
|
|---|
| 106 | if ( $?OBUILD_CXX ) then
|
|---|
| 107 | set obuild_platform_compiler=${OBUILD_CXX}
|
|---|
| 108 | else
|
|---|
| 109 | set obuild_platform_compiler=c++
|
|---|
| 110 | endif
|
|---|
| 111 | else
|
|---|
| 112 | set obuild_platform_compiler=${obuild_cxx_command}
|
|---|
| 113 | endif
|
|---|
| 114 | else
|
|---|
| 115 | set obuild_platform_compiler=c++
|
|---|
| 116 | endif
|
|---|
| 117 | ${obuild_platform_compiler} -o "${obuild_snovis_path}/${obuild_dir_bin}/obuild_platform" "${obuild_snovis_path}/obuild/cpp/obuild_platform.cpp"
|
|---|
| 118 | unset obuild_platform_compiler
|
|---|
| 119 | if ( ! -e "${obuild_snovis_path}/${obuild_dir_bin}/obuild_platform" ) then
|
|---|
| 120 | echo "Program obuild_platform not found."
|
|---|
| 121 | exit
|
|---|
| 122 | endif
|
|---|
| 123 | endif
|
|---|
| 124 | set obuild_platform_exe="${obuild_snovis_path}/${obuild_dir_bin}/obuild_platform"
|
|---|
| 125 | if ( "${obuild_platform_exe}" == "" ) then
|
|---|
| 126 | echo "Variable obuild_platform_exe not defined."
|
|---|
| 127 | exit
|
|---|
| 128 | endif
|
|---|
| 129 | set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} UNIX`
|
|---|
| 130 | if ( ${obuild_platform_result} == yes ) then
|
|---|
| 131 | set bhep_home="/Users/barrand/dev/exp/nemo/bhep/v1r4p2"
|
|---|
| 132 | endif
|
|---|
| 133 | unset obuild_platform_result
|
|---|
| 134 | if ( "${obuild_platform_exe}" == "" ) then
|
|---|
| 135 | echo "Variable obuild_platform_exe not defined."
|
|---|
| 136 | exit
|
|---|
| 137 | endif
|
|---|
| 138 | set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin`
|
|---|
| 139 | if ( ${obuild_platform_result} == yes ) then
|
|---|
| 140 | set bhep_platform="Darwin"
|
|---|
| 141 | endif
|
|---|
| 142 | unset obuild_platform_result
|
|---|
| 143 | if ( "${obuild_platform_exe}" == "" ) then
|
|---|
| 144 | echo "Variable obuild_platform_exe not defined."
|
|---|
| 145 | exit
|
|---|
| 146 | endif
|
|---|
| 147 | set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} UNIX`
|
|---|
| 148 | if ( ${obuild_platform_result} == yes ) then
|
|---|
| 149 | set snova_home="/Users/barrand/dev/exp/nemo/snova/v2r0p0"
|
|---|
| 150 | endif
|
|---|
| 151 | unset obuild_platform_result
|
|---|
| 152 | if ( "${obuild_platform_exe}" == "" ) then
|
|---|
| 153 | echo "Variable obuild_platform_exe not defined."
|
|---|
| 154 | exit
|
|---|
| 155 | endif
|
|---|
| 156 | set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin`
|
|---|
| 157 | if ( ${obuild_platform_result} == yes ) then
|
|---|
| 158 | set snova_platform="Darwin"
|
|---|
| 159 | endif
|
|---|
| 160 | unset obuild_platform_result
|
|---|
| 161 | if ( "${obuild_platform_exe}" == "" ) then
|
|---|
| 162 | echo "Variable obuild_platform_exe not defined."
|
|---|
| 163 | exit
|
|---|
| 164 | endif
|
|---|
| 165 | set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} UNIX`
|
|---|
| 166 | if ( ${obuild_platform_result} == yes ) then
|
|---|
| 167 | set CLHEP_home="/usr/local/CLHEP/2.0.3.1"
|
|---|
| 168 | endif
|
|---|
| 169 | unset obuild_platform_result
|
|---|
| 170 | if ( "${obuild_platform_exe}" == "" ) then
|
|---|
| 171 | echo "Variable obuild_platform_exe not defined."
|
|---|
| 172 | exit
|
|---|
| 173 | endif
|
|---|
| 174 | set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} UNIX`
|
|---|
| 175 | if ( ${obuild_platform_result} == yes ) then
|
|---|
| 176 | set Geant4_home="/usr/local/geant4/8.2"
|
|---|
| 177 | endif
|
|---|
| 178 | unset obuild_platform_result
|
|---|
| 179 | if ( ! -e "${obuild_snovis_path}/${obuild_dir_bin}/obuild_find" ) then
|
|---|
| 180 | if ( ! -e "${obuild_snovis_path}/obuild/cpp/obuild_find.cpp" ) then
|
|---|
| 181 | echo "Program source obuild_find.cpp not found."
|
|---|
| 182 | exit
|
|---|
| 183 | endif
|
|---|
| 184 | if ( $?obuild_cxx_command ) then
|
|---|
| 185 | if ( "${obuild_cxx_command}" == "" ) then
|
|---|
| 186 | if ( $?OBUILD_CXX ) then
|
|---|
| 187 | set obuild_find_compiler=${OBUILD_CXX}
|
|---|
| 188 | else
|
|---|
| 189 | set obuild_find_compiler=c++
|
|---|
| 190 | endif
|
|---|
| 191 | else
|
|---|
| 192 | set obuild_find_compiler=${obuild_cxx_command}
|
|---|
| 193 | endif
|
|---|
| 194 | else
|
|---|
| 195 | set obuild_find_compiler=c++
|
|---|
| 196 | endif
|
|---|
| 197 | ${obuild_find_compiler} -o "${obuild_snovis_path}/${obuild_dir_bin}/obuild_find" "${obuild_snovis_path}/obuild/cpp/obuild_find.cpp"
|
|---|
| 198 | unset obuild_find_compiler
|
|---|
| 199 | if ( ! -e "${obuild_snovis_path}/${obuild_dir_bin}/obuild_find" ) then
|
|---|
| 200 | echo "Program obuild_find not found."
|
|---|
| 201 | exit
|
|---|
| 202 | endif
|
|---|
| 203 | endif
|
|---|
| 204 | set obuild_find_exe="${obuild_snovis_path}/${obuild_dir_bin}/obuild_find"
|
|---|
| 205 | if ( "${obuild_find_exe}" == "" ) then
|
|---|
| 206 | echo "Variable obuild_find_exe not defined."
|
|---|
| 207 | exit
|
|---|
| 208 | endif
|
|---|
| 209 | set obuild_OnX_path=`"${obuild_find_exe}" OnX 'v17r*'`
|
|---|
| 210 | if ( "${obuild_find_exe}" == "" ) then
|
|---|
| 211 | echo "Variable obuild_find_exe not defined."
|
|---|
| 212 | exit
|
|---|
| 213 | endif
|
|---|
| 214 | set obuild_G4Lab_path=`"${obuild_find_exe}" G4Lab 'v8r*'`
|
|---|
| 215 |
|
|---|
| 216 | # Execute setup of used packages :
|
|---|
| 217 | source "${obuild_OnX_path}/obuild/setup.csh"
|
|---|
| 218 |
|
|---|
| 219 | source "${obuild_G4Lab_path}/obuild/setup.csh"
|
|---|
| 220 |
|
|---|
| 221 | # Set environment variables of this package :
|
|---|
| 222 | setenv SNOVISROOT "${obuild_snovis_path}"
|
|---|
| 223 | setenv G4RADIOACTIVEDATA "${Geant4_home}/data/RadiativeDecay3.1"
|
|---|
| 224 | setenv G4LEVELGAMMADATA "${Geant4_home}/data/PhotonEvaporation2.0"
|
|---|
| 225 | setenv G4LEDATA "${Geant4_home}/data/G4EMLOW4.2"
|
|---|
| 226 | setenv NeutronHPCrossSections "${Geant4_home}/data/G4NDL3.10"
|
|---|
| 227 |
|
|---|
| 228 | if ( "${obuild_platform_exe}" == "" ) then
|
|---|
| 229 | echo "Variable obuild_platform_exe not defined."
|
|---|
| 230 | exit
|
|---|
| 231 | endif
|
|---|
| 232 | set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin`
|
|---|
| 233 | if ( ${obuild_platform_result} == yes ) then
|
|---|
| 234 | if ( "${obuild_platform_exe}" == "" ) then
|
|---|
| 235 | echo "Variable obuild_platform_exe not defined."
|
|---|
| 236 | exit
|
|---|
| 237 | endif
|
|---|
| 238 | set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin`
|
|---|
| 239 | if ( ${obuild_platform_result} == yes ) then
|
|---|
| 240 | if ( $?DYLD_LIBRARY_PATH ) then
|
|---|
| 241 | setenv DYLD_LIBRARY_PATH "${DYLD_LIBRARY_PATH}:${bhep_home}/Darwin"
|
|---|
| 242 | else
|
|---|
| 243 | setenv DYLD_LIBRARY_PATH "${bhep_home}/Darwin"
|
|---|
| 244 | endif
|
|---|
| 245 | endif
|
|---|
| 246 | unset obuild_platform_result
|
|---|
| 247 | else
|
|---|
| 248 | if ( "${obuild_platform_exe}" == "" ) then
|
|---|
| 249 | echo "Variable obuild_platform_exe not defined."
|
|---|
| 250 | exit
|
|---|
| 251 | endif
|
|---|
| 252 | set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin`
|
|---|
| 253 | if ( ${obuild_platform_result} == yes ) then
|
|---|
| 254 | if ( $?LD_LIBRARY_PATH ) then
|
|---|
| 255 | setenv LD_LIBRARY_PATH "${LD_LIBRARY_PATH}:${bhep_home}/Darwin"
|
|---|
| 256 | else
|
|---|
| 257 | setenv LD_LIBRARY_PATH "${bhep_home}/Darwin"
|
|---|
| 258 | endif
|
|---|
| 259 | endif
|
|---|
| 260 | unset obuild_platform_result
|
|---|
| 261 | endif
|
|---|
| 262 | unset obuild_platform_result
|
|---|
| 263 |
|
|---|
| 264 | if ( "${obuild_platform_exe}" == "" ) then
|
|---|
| 265 | echo "Variable obuild_platform_exe not defined."
|
|---|
| 266 | exit
|
|---|
| 267 | endif
|
|---|
| 268 | set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin`
|
|---|
| 269 | if ( ${obuild_platform_result} == yes ) then
|
|---|
| 270 | if ( "${obuild_platform_exe}" == "" ) then
|
|---|
| 271 | echo "Variable obuild_platform_exe not defined."
|
|---|
| 272 | exit
|
|---|
| 273 | endif
|
|---|
| 274 | set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin`
|
|---|
| 275 | if ( ${obuild_platform_result} == yes ) then
|
|---|
| 276 | if ( $?DYLD_LIBRARY_PATH ) then
|
|---|
| 277 | setenv DYLD_LIBRARY_PATH "${DYLD_LIBRARY_PATH}:${snova_home}/Darwin"
|
|---|
| 278 | else
|
|---|
| 279 | setenv DYLD_LIBRARY_PATH "${snova_home}/Darwin"
|
|---|
| 280 | endif
|
|---|
| 281 | endif
|
|---|
| 282 | unset obuild_platform_result
|
|---|
| 283 | else
|
|---|
| 284 | if ( "${obuild_platform_exe}" == "" ) then
|
|---|
| 285 | echo "Variable obuild_platform_exe not defined."
|
|---|
| 286 | exit
|
|---|
| 287 | endif
|
|---|
| 288 | set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin`
|
|---|
| 289 | if ( ${obuild_platform_result} == yes ) then
|
|---|
| 290 | if ( $?LD_LIBRARY_PATH ) then
|
|---|
| 291 | setenv LD_LIBRARY_PATH "${LD_LIBRARY_PATH}:${snova_home}/Darwin"
|
|---|
| 292 | else
|
|---|
| 293 | setenv LD_LIBRARY_PATH "${snova_home}/Darwin"
|
|---|
| 294 | endif
|
|---|
| 295 | endif
|
|---|
| 296 | unset obuild_platform_result
|
|---|
| 297 | endif
|
|---|
| 298 | unset obuild_platform_result
|
|---|
| 299 |
|
|---|
| 300 | if ( "${obuild_platform_exe}" == "" ) then
|
|---|
| 301 | echo "Variable obuild_platform_exe not defined."
|
|---|
| 302 | exit
|
|---|
| 303 | endif
|
|---|
| 304 | set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin`
|
|---|
| 305 | if ( ${obuild_platform_result} == yes ) then
|
|---|
| 306 | if ( $?DYLD_LIBRARY_PATH ) then
|
|---|
| 307 | setenv DYLD_LIBRARY_PATH "${DYLD_LIBRARY_PATH}:${obuild_snovis_path}/${obuild_dir_bin}"
|
|---|
| 308 | else
|
|---|
| 309 | setenv DYLD_LIBRARY_PATH "${obuild_snovis_path}/${obuild_dir_bin}"
|
|---|
| 310 | endif
|
|---|
| 311 | else
|
|---|
| 312 | if ( $?LD_LIBRARY_PATH ) then
|
|---|
| 313 | setenv LD_LIBRARY_PATH "${LD_LIBRARY_PATH}:${obuild_snovis_path}/${obuild_dir_bin}"
|
|---|
| 314 | else
|
|---|
| 315 | setenv LD_LIBRARY_PATH "${obuild_snovis_path}/${obuild_dir_bin}"
|
|---|
| 316 | endif
|
|---|
| 317 | endif
|
|---|
| 318 | unset obuild_platform_result
|
|---|
| 319 |
|
|---|
| 320 | if ( $?PATH ) then
|
|---|
| 321 | setenv PATH "${PATH}:${obuild_snovis_path}/${obuild_dir_bin}"
|
|---|
| 322 | else
|
|---|
| 323 | setenv PATH "${obuild_snovis_path}/${obuild_dir_bin}"
|
|---|
| 324 | endif
|
|---|
| 325 |
|
|---|
| 326 | unset obuild_snovis_path
|
|---|
| 327 |
|
|---|
| 328 | #FIXME unset obuild_platform
|
|---|
| 329 | #FIXME unset obuild_dir_bin
|
|---|