[133] | 1 | #!/bin/csh -f |
---|
| 2 | |
---|
| 3 | # |
---|
| 4 | # File produced by the obuild tool version 1.0 |
---|
[144] | 5 | # for the package snova with version v2r0p0. |
---|
[133] | 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_snova_path="@@absolute_dir@@" |
---|
| 44 | |
---|
| 45 | |
---|
| 46 | if ( "${obuild_snova_path}" == '@@absolute_dir@@' ) then |
---|
| 47 | echo ' The package snova had not been installed.' |
---|
| 48 | echo '' |
---|
| 49 | echo ' In the file :' |
---|
| 50 | echo ' snova/<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 |
---|
[275] | 86 | set obuild_dir_bin=bin_obuild |
---|
[133] | 87 | else |
---|
| 88 | set obuild_dir_bin=${OBUILD_DIR_BIN} |
---|
| 89 | endif |
---|
| 90 | else |
---|
[275] | 91 | set obuild_dir_bin=bin_obuild |
---|
[133] | 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_snova_path}/${obuild_dir_bin}/obuild_platform" ) then |
---|
| 100 | if ( ! -e "${obuild_snova_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_snova_path}/${obuild_dir_bin}/obuild_platform" "${obuild_snova_path}/obuild/cpp/obuild_platform.cpp" |
---|
| 118 | unset obuild_platform_compiler |
---|
| 119 | if ( ! -e "${obuild_snova_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_snova_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 CLHEP_home="/usr/local/CLHEP/2.0.3.1" |
---|
| 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} UNIX` |
---|
| 139 | if ( ${obuild_platform_result} == yes ) then |
---|
| 140 | set Geant4_home="/usr/local/geant4/8.2" |
---|
| 141 | endif |
---|
| 142 | unset obuild_platform_result |
---|
[241] | 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 HDF5_home="/usr/local/HDF5/1.6.5" |
---|
| 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} UNIX` |
---|
| 157 | if ( ${obuild_platform_result} == yes ) then |
---|
| 158 | set zlib_home="/usr" |
---|
| 159 | endif |
---|
| 160 | unset obuild_platform_result |
---|
[184] | 161 | if ( ! -e "${obuild_snova_path}/${obuild_dir_bin}/obuild_find" ) then |
---|
| 162 | if ( ! -e "${obuild_snova_path}/obuild/cpp/obuild_find.cpp" ) then |
---|
| 163 | echo "Program source obuild_find.cpp not found." |
---|
| 164 | exit |
---|
| 165 | endif |
---|
| 166 | if ( $?obuild_cxx_command ) then |
---|
| 167 | if ( "${obuild_cxx_command}" == "" ) then |
---|
| 168 | if ( $?OBUILD_CXX ) then |
---|
| 169 | set obuild_find_compiler=${OBUILD_CXX} |
---|
| 170 | else |
---|
| 171 | set obuild_find_compiler=c++ |
---|
| 172 | endif |
---|
| 173 | else |
---|
| 174 | set obuild_find_compiler=${obuild_cxx_command} |
---|
| 175 | endif |
---|
| 176 | else |
---|
| 177 | set obuild_find_compiler=c++ |
---|
| 178 | endif |
---|
| 179 | ${obuild_find_compiler} -o "${obuild_snova_path}/${obuild_dir_bin}/obuild_find" "${obuild_snova_path}/obuild/cpp/obuild_find.cpp" |
---|
| 180 | unset obuild_find_compiler |
---|
| 181 | if ( ! -e "${obuild_snova_path}/${obuild_dir_bin}/obuild_find" ) then |
---|
| 182 | echo "Program obuild_find not found." |
---|
| 183 | exit |
---|
| 184 | endif |
---|
| 185 | endif |
---|
| 186 | set obuild_find_exe="${obuild_snova_path}/${obuild_dir_bin}/obuild_find" |
---|
| 187 | if ( "${obuild_find_exe}" == "" ) then |
---|
| 188 | echo "Variable obuild_find_exe not defined." |
---|
| 189 | exit |
---|
| 190 | endif |
---|
| 191 | set obuild_bhep_path=`"${obuild_find_exe}" bhep 'v1r4p2'` |
---|
| 192 | |
---|
| 193 | # Execute setup of used packages : |
---|
| 194 | source "${obuild_bhep_path}/obuild/setup.csh" |
---|
| 195 | |
---|
[133] | 196 | # Set environment variables of this package : |
---|
| 197 | |
---|
| 198 | if ( "${obuild_platform_exe}" == "" ) then |
---|
| 199 | echo "Variable obuild_platform_exe not defined." |
---|
| 200 | exit |
---|
| 201 | endif |
---|
| 202 | set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin` |
---|
| 203 | if ( ${obuild_platform_result} == yes ) then |
---|
[186] | 204 | if ( "${obuild_platform_exe}" == "" ) then |
---|
| 205 | echo "Variable obuild_platform_exe not defined." |
---|
| 206 | exit |
---|
| 207 | endif |
---|
| 208 | set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} UNIX` |
---|
| 209 | if ( ${obuild_platform_result} == yes ) then |
---|
[133] | 210 | if ( $?DYLD_LIBRARY_PATH ) then |
---|
[241] | 211 | setenv DYLD_LIBRARY_PATH "${DYLD_LIBRARY_PATH}:${HDF5_home}/lib" |
---|
| 212 | else |
---|
| 213 | setenv DYLD_LIBRARY_PATH "${HDF5_home}/lib" |
---|
| 214 | endif |
---|
| 215 | endif |
---|
| 216 | unset obuild_platform_result |
---|
| 217 | else |
---|
| 218 | if ( "${obuild_platform_exe}" == "" ) then |
---|
| 219 | echo "Variable obuild_platform_exe not defined." |
---|
| 220 | exit |
---|
| 221 | endif |
---|
| 222 | set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} UNIX` |
---|
| 223 | if ( ${obuild_platform_result} == yes ) then |
---|
| 224 | if ( $?LD_LIBRARY_PATH ) then |
---|
| 225 | setenv LD_LIBRARY_PATH "${LD_LIBRARY_PATH}:${HDF5_home}/lib" |
---|
| 226 | else |
---|
| 227 | setenv LD_LIBRARY_PATH "${HDF5_home}/lib" |
---|
| 228 | endif |
---|
| 229 | endif |
---|
| 230 | unset obuild_platform_result |
---|
| 231 | endif |
---|
| 232 | unset obuild_platform_result |
---|
| 233 | |
---|
| 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 ( "${obuild_platform_exe}" == "" ) then |
---|
| 241 | echo "Variable obuild_platform_exe not defined." |
---|
| 242 | exit |
---|
| 243 | endif |
---|
| 244 | set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} UNIX` |
---|
| 245 | if ( ${obuild_platform_result} == yes ) then |
---|
| 246 | if ( $?DYLD_LIBRARY_PATH ) then |
---|
[186] | 247 | setenv DYLD_LIBRARY_PATH "${DYLD_LIBRARY_PATH}:${CLHEP_home}/lib" |
---|
| 248 | else |
---|
| 249 | setenv DYLD_LIBRARY_PATH "${CLHEP_home}/lib" |
---|
| 250 | endif |
---|
| 251 | endif |
---|
| 252 | unset obuild_platform_result |
---|
| 253 | else |
---|
| 254 | if ( "${obuild_platform_exe}" == "" ) then |
---|
| 255 | echo "Variable obuild_platform_exe not defined." |
---|
| 256 | exit |
---|
| 257 | endif |
---|
| 258 | set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} UNIX` |
---|
| 259 | if ( ${obuild_platform_result} == yes ) then |
---|
| 260 | if ( $?LD_LIBRARY_PATH ) then |
---|
| 261 | setenv LD_LIBRARY_PATH "${LD_LIBRARY_PATH}:${CLHEP_home}/lib" |
---|
| 262 | else |
---|
| 263 | setenv LD_LIBRARY_PATH "${CLHEP_home}/lib" |
---|
| 264 | endif |
---|
| 265 | endif |
---|
| 266 | unset obuild_platform_result |
---|
| 267 | endif |
---|
| 268 | unset obuild_platform_result |
---|
| 269 | |
---|
| 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 ( "${obuild_platform_exe}" == "" ) then |
---|
| 277 | echo "Variable obuild_platform_exe not defined." |
---|
| 278 | exit |
---|
| 279 | endif |
---|
| 280 | set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} UNIX` |
---|
| 281 | if ( ${obuild_platform_result} == yes ) then |
---|
| 282 | if ( $?DYLD_LIBRARY_PATH ) then |
---|
| 283 | setenv DYLD_LIBRARY_PATH "${DYLD_LIBRARY_PATH}:${Geant4_home}/lib" |
---|
| 284 | else |
---|
| 285 | setenv DYLD_LIBRARY_PATH "${Geant4_home}/lib" |
---|
| 286 | endif |
---|
| 287 | endif |
---|
| 288 | unset obuild_platform_result |
---|
| 289 | else |
---|
| 290 | if ( "${obuild_platform_exe}" == "" ) then |
---|
| 291 | echo "Variable obuild_platform_exe not defined." |
---|
| 292 | exit |
---|
| 293 | endif |
---|
| 294 | set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} UNIX` |
---|
| 295 | if ( ${obuild_platform_result} == yes ) then |
---|
| 296 | if ( $?LD_LIBRARY_PATH ) then |
---|
| 297 | setenv LD_LIBRARY_PATH "${LD_LIBRARY_PATH}:${Geant4_home}/lib" |
---|
| 298 | else |
---|
| 299 | setenv LD_LIBRARY_PATH "${Geant4_home}/lib" |
---|
| 300 | endif |
---|
| 301 | endif |
---|
| 302 | unset obuild_platform_result |
---|
| 303 | endif |
---|
| 304 | unset obuild_platform_result |
---|
| 305 | |
---|
| 306 | if ( "${obuild_platform_exe}" == "" ) then |
---|
| 307 | echo "Variable obuild_platform_exe not defined." |
---|
| 308 | exit |
---|
| 309 | endif |
---|
| 310 | set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin` |
---|
| 311 | if ( ${obuild_platform_result} == yes ) then |
---|
| 312 | if ( $?DYLD_LIBRARY_PATH ) then |
---|
[133] | 313 | setenv DYLD_LIBRARY_PATH "${DYLD_LIBRARY_PATH}:${obuild_snova_path}/${obuild_dir_bin}" |
---|
| 314 | else |
---|
| 315 | setenv DYLD_LIBRARY_PATH "${obuild_snova_path}/${obuild_dir_bin}" |
---|
| 316 | endif |
---|
| 317 | else |
---|
| 318 | if ( $?LD_LIBRARY_PATH ) then |
---|
| 319 | setenv LD_LIBRARY_PATH "${LD_LIBRARY_PATH}:${obuild_snova_path}/${obuild_dir_bin}" |
---|
| 320 | else |
---|
| 321 | setenv LD_LIBRARY_PATH "${obuild_snova_path}/${obuild_dir_bin}" |
---|
| 322 | endif |
---|
| 323 | endif |
---|
| 324 | unset obuild_platform_result |
---|
| 325 | |
---|
[241] | 326 | if ( $?PATH ) then |
---|
| 327 | setenv PATH "${PATH}:${obuild_snova_path}/${obuild_dir_bin}" |
---|
| 328 | else |
---|
| 329 | setenv PATH "${obuild_snova_path}/${obuild_dir_bin}" |
---|
| 330 | endif |
---|
| 331 | |
---|
[133] | 332 | unset obuild_snova_path |
---|
| 333 | |
---|
| 334 | #FIXME unset obuild_platform |
---|
| 335 | #FIXME unset obuild_dir_bin |
---|