| 1 | #!/bin/csh -f
|
|---|
| 2 |
|
|---|
| 3 | #
|
|---|
| 4 | # File produced by the obuild tool version 1.0
|
|---|
| 5 | # for the package snova with version v2r0p0.
|
|---|
| 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
|
|---|
| 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_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
|
|---|
| 143 | if ( ! -e "${obuild_snova_path}/${obuild_dir_bin}/obuild_find" ) then
|
|---|
| 144 | if ( ! -e "${obuild_snova_path}/obuild/cpp/obuild_find.cpp" ) then
|
|---|
| 145 | echo "Program source obuild_find.cpp not found."
|
|---|
| 146 | exit
|
|---|
| 147 | endif
|
|---|
| 148 | if ( $?obuild_cxx_command ) then
|
|---|
| 149 | if ( "${obuild_cxx_command}" == "" ) then
|
|---|
| 150 | if ( $?OBUILD_CXX ) then
|
|---|
| 151 | set obuild_find_compiler=${OBUILD_CXX}
|
|---|
| 152 | else
|
|---|
| 153 | set obuild_find_compiler=c++
|
|---|
| 154 | endif
|
|---|
| 155 | else
|
|---|
| 156 | set obuild_find_compiler=${obuild_cxx_command}
|
|---|
| 157 | endif
|
|---|
| 158 | else
|
|---|
| 159 | set obuild_find_compiler=c++
|
|---|
| 160 | endif
|
|---|
| 161 | ${obuild_find_compiler} -o "${obuild_snova_path}/${obuild_dir_bin}/obuild_find" "${obuild_snova_path}/obuild/cpp/obuild_find.cpp"
|
|---|
| 162 | unset obuild_find_compiler
|
|---|
| 163 | if ( ! -e "${obuild_snova_path}/${obuild_dir_bin}/obuild_find" ) then
|
|---|
| 164 | echo "Program obuild_find not found."
|
|---|
| 165 | exit
|
|---|
| 166 | endif
|
|---|
| 167 | endif
|
|---|
| 168 | set obuild_find_exe="${obuild_snova_path}/${obuild_dir_bin}/obuild_find"
|
|---|
| 169 | if ( "${obuild_find_exe}" == "" ) then
|
|---|
| 170 | echo "Variable obuild_find_exe not defined."
|
|---|
| 171 | exit
|
|---|
| 172 | endif
|
|---|
| 173 | set obuild_bhep_path=`"${obuild_find_exe}" bhep 'v1r4p2'`
|
|---|
| 174 | if ( "${obuild_find_exe}" == "" ) then
|
|---|
| 175 | echo "Variable obuild_find_exe not defined."
|
|---|
| 176 | exit
|
|---|
| 177 | endif
|
|---|
| 178 | set obuild_HDF5_path=`"${obuild_find_exe}" HDF5 'v1r*'`
|
|---|
| 179 |
|
|---|
| 180 | # Execute setup of used packages :
|
|---|
| 181 | source "${obuild_bhep_path}/obuild/setup.csh"
|
|---|
| 182 |
|
|---|
| 183 | source "${obuild_HDF5_path}/obuild/setup.csh"
|
|---|
| 184 |
|
|---|
| 185 | # Set environment variables of this package :
|
|---|
| 186 |
|
|---|
| 187 | if ( "${obuild_platform_exe}" == "" ) then
|
|---|
| 188 | echo "Variable obuild_platform_exe not defined."
|
|---|
| 189 | exit
|
|---|
| 190 | endif
|
|---|
| 191 | set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin`
|
|---|
| 192 | if ( ${obuild_platform_result} == yes ) then
|
|---|
| 193 | if ( $?DYLD_LIBRARY_PATH ) then
|
|---|
| 194 | setenv DYLD_LIBRARY_PATH "${DYLD_LIBRARY_PATH}:${obuild_snova_path}/${obuild_dir_bin}"
|
|---|
| 195 | else
|
|---|
| 196 | setenv DYLD_LIBRARY_PATH "${obuild_snova_path}/${obuild_dir_bin}"
|
|---|
| 197 | endif
|
|---|
| 198 | else
|
|---|
| 199 | if ( $?LD_LIBRARY_PATH ) then
|
|---|
| 200 | setenv LD_LIBRARY_PATH "${LD_LIBRARY_PATH}:${obuild_snova_path}/${obuild_dir_bin}"
|
|---|
| 201 | else
|
|---|
| 202 | setenv LD_LIBRARY_PATH "${obuild_snova_path}/${obuild_dir_bin}"
|
|---|
| 203 | endif
|
|---|
| 204 | endif
|
|---|
| 205 | unset obuild_platform_result
|
|---|
| 206 |
|
|---|
| 207 | unset obuild_snova_path
|
|---|
| 208 |
|
|---|
| 209 | #FIXME unset obuild_platform
|
|---|
| 210 | #FIXME unset obuild_dir_bin
|
|---|