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/v1r4p1" |
---|
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 GeomUtils_home="/Users/barrand/dev/exp/nemo/SNgeom/v0r1p0/build_area/GeomUtils" |
---|
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 GeomUtils_platform="Darwin-i386" |
---|
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 SNgeom2_home="/Users/barrand/dev/exp/nemo/SNgeom/v0r1p0/build_area/SNgeom2" |
---|
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 snova_home="/Users/barrand/dev/exp/nemo/SNgeom/v0r1p0/build_area/snova" |
---|
177 | endif |
---|
178 | unset obuild_platform_result |
---|
179 | if ( "${obuild_platform_exe}" == "" ) then |
---|
180 | echo "Variable obuild_platform_exe not defined." |
---|
181 | exit |
---|
182 | endif |
---|
183 | set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} UNIX` |
---|
184 | if ( ${obuild_platform_result} == yes ) then |
---|
185 | set CLHEP_home="/usr/local/CLHEP/2.0.3.1" |
---|
186 | endif |
---|
187 | unset obuild_platform_result |
---|
188 | if ( "${obuild_platform_exe}" == "" ) then |
---|
189 | echo "Variable obuild_platform_exe not defined." |
---|
190 | exit |
---|
191 | endif |
---|
192 | set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} UNIX` |
---|
193 | if ( ${obuild_platform_result} == yes ) then |
---|
194 | set Geant4_home="/geant4/geant4.8.2" |
---|
195 | endif |
---|
196 | unset obuild_platform_result |
---|
197 | if ( "${obuild_platform_exe}" == "" ) then |
---|
198 | echo "Variable obuild_platform_exe not defined." |
---|
199 | exit |
---|
200 | endif |
---|
201 | set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin` |
---|
202 | if ( ${obuild_platform_result} == yes ) then |
---|
203 | set Geant4_work="${Geant4_home}/Darwin" |
---|
204 | endif |
---|
205 | unset obuild_platform_result |
---|
206 | if ( "${obuild_platform_exe}" == "" ) then |
---|
207 | echo "Variable obuild_platform_exe not defined." |
---|
208 | exit |
---|
209 | endif |
---|
210 | set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Linux` |
---|
211 | if ( ${obuild_platform_result} == yes ) then |
---|
212 | set Geant4_work="${Geant4_home}/slc3_gcc323" |
---|
213 | endif |
---|
214 | unset obuild_platform_result |
---|
215 | if ( "${obuild_platform_exe}" == "" ) then |
---|
216 | echo "Variable obuild_platform_exe not defined." |
---|
217 | exit |
---|
218 | endif |
---|
219 | set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin` |
---|
220 | if ( ${obuild_platform_result} == yes ) then |
---|
221 | set Geant4_system="Darwin-g++" |
---|
222 | endif |
---|
223 | unset obuild_platform_result |
---|
224 | if ( "${obuild_platform_exe}" == "" ) then |
---|
225 | echo "Variable obuild_platform_exe not defined." |
---|
226 | exit |
---|
227 | endif |
---|
228 | set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Linux` |
---|
229 | if ( ${obuild_platform_result} == yes ) then |
---|
230 | set Geant4_system="Linux-g++" |
---|
231 | endif |
---|
232 | unset obuild_platform_result |
---|
233 | if ( "${obuild_platform_exe}" == "" ) then |
---|
234 | echo "Variable obuild_platform_exe not defined." |
---|
235 | exit |
---|
236 | endif |
---|
237 | set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Windows_NT` |
---|
238 | if ( ${obuild_platform_result} == yes ) then |
---|
239 | set Geant4_system="WIN32-VC" |
---|
240 | endif |
---|
241 | unset obuild_platform_result |
---|
242 | if ( ! -e "${obuild_snovis_path}/${obuild_dir_bin}/obuild_find" ) then |
---|
243 | if ( ! -e "${obuild_snovis_path}/obuild/cpp/obuild_find.cpp" ) then |
---|
244 | echo "Program source obuild_find.cpp not found." |
---|
245 | exit |
---|
246 | endif |
---|
247 | if ( $?obuild_cxx_command ) then |
---|
248 | if ( "${obuild_cxx_command}" == "" ) then |
---|
249 | if ( $?OBUILD_CXX ) then |
---|
250 | set obuild_find_compiler=${OBUILD_CXX} |
---|
251 | else |
---|
252 | set obuild_find_compiler=c++ |
---|
253 | endif |
---|
254 | else |
---|
255 | set obuild_find_compiler=${obuild_cxx_command} |
---|
256 | endif |
---|
257 | else |
---|
258 | set obuild_find_compiler=c++ |
---|
259 | endif |
---|
260 | ${obuild_find_compiler} -o "${obuild_snovis_path}/${obuild_dir_bin}/obuild_find" "${obuild_snovis_path}/obuild/cpp/obuild_find.cpp" |
---|
261 | unset obuild_find_compiler |
---|
262 | if ( ! -e "${obuild_snovis_path}/${obuild_dir_bin}/obuild_find" ) then |
---|
263 | echo "Program obuild_find not found." |
---|
264 | exit |
---|
265 | endif |
---|
266 | endif |
---|
267 | set obuild_find_exe="${obuild_snovis_path}/${obuild_dir_bin}/obuild_find" |
---|
268 | if ( "${obuild_find_exe}" == "" ) then |
---|
269 | echo "Variable obuild_find_exe not defined." |
---|
270 | exit |
---|
271 | endif |
---|
272 | set obuild_OnX_path=`"${obuild_find_exe}" OnX 'v17r*'` |
---|
273 | if ( "${obuild_find_exe}" == "" ) then |
---|
274 | echo "Variable obuild_find_exe not defined." |
---|
275 | exit |
---|
276 | endif |
---|
277 | set obuild_G4Lab_path=`"${obuild_find_exe}" G4Lab 'v8r*'` |
---|
278 | |
---|
279 | # Execute setup of used packages : |
---|
280 | source "${obuild_OnX_path}/obuild/setup.csh" |
---|
281 | |
---|
282 | source "${obuild_G4Lab_path}/obuild/setup.csh" |
---|
283 | |
---|
284 | # Set environment variables of this package : |
---|
285 | setenv SNOVISROOT "${obuild_snovis_path}" |
---|
286 | setenv G4RADIOACTIVEDATA "${Geant4_home}/data/RadiativeDecay3.1" |
---|
287 | setenv G4LEVELGAMMADATA "${Geant4_home}/data/PhotonEvaporation2.0" |
---|
288 | setenv G4LEDATA "${Geant4_home}/data/G4EMLOW4.2" |
---|
289 | setenv NeutronHPCrossSections "${Geant4_home}/data/G4NDL3.10" |
---|
290 | |
---|
291 | if ( "${obuild_platform_exe}" == "" ) then |
---|
292 | echo "Variable obuild_platform_exe not defined." |
---|
293 | exit |
---|
294 | endif |
---|
295 | set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin` |
---|
296 | if ( ${obuild_platform_result} == yes ) then |
---|
297 | if ( "${obuild_platform_exe}" == "" ) then |
---|
298 | echo "Variable obuild_platform_exe not defined." |
---|
299 | exit |
---|
300 | endif |
---|
301 | set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin` |
---|
302 | if ( ${obuild_platform_result} == yes ) then |
---|
303 | if ( $?DYLD_LIBRARY_PATH ) then |
---|
304 | setenv DYLD_LIBRARY_PATH "${DYLD_LIBRARY_PATH}:${GeomUtils_home}/Darwin-i386/lib" |
---|
305 | else |
---|
306 | setenv DYLD_LIBRARY_PATH "${GeomUtils_home}/Darwin-i386/lib" |
---|
307 | endif |
---|
308 | endif |
---|
309 | unset obuild_platform_result |
---|
310 | else |
---|
311 | if ( "${obuild_platform_exe}" == "" ) then |
---|
312 | echo "Variable obuild_platform_exe not defined." |
---|
313 | exit |
---|
314 | endif |
---|
315 | set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin` |
---|
316 | if ( ${obuild_platform_result} == yes ) then |
---|
317 | if ( $?LD_LIBRARY_PATH ) then |
---|
318 | setenv LD_LIBRARY_PATH "${LD_LIBRARY_PATH}:${GeomUtils_home}/Darwin-i386/lib" |
---|
319 | else |
---|
320 | setenv LD_LIBRARY_PATH "${GeomUtils_home}/Darwin-i386/lib" |
---|
321 | endif |
---|
322 | endif |
---|
323 | unset obuild_platform_result |
---|
324 | endif |
---|
325 | unset obuild_platform_result |
---|
326 | |
---|
327 | if ( "${obuild_platform_exe}" == "" ) then |
---|
328 | echo "Variable obuild_platform_exe not defined." |
---|
329 | exit |
---|
330 | endif |
---|
331 | set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin` |
---|
332 | if ( ${obuild_platform_result} == yes ) then |
---|
333 | if ( "${obuild_platform_exe}" == "" ) then |
---|
334 | echo "Variable obuild_platform_exe not defined." |
---|
335 | exit |
---|
336 | endif |
---|
337 | set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin` |
---|
338 | if ( ${obuild_platform_result} == yes ) then |
---|
339 | if ( $?DYLD_LIBRARY_PATH ) then |
---|
340 | setenv DYLD_LIBRARY_PATH "${DYLD_LIBRARY_PATH}:${SNgeom2_home}/Darwin-i386/lib" |
---|
341 | else |
---|
342 | setenv DYLD_LIBRARY_PATH "${SNgeom2_home}/Darwin-i386/lib" |
---|
343 | endif |
---|
344 | endif |
---|
345 | unset obuild_platform_result |
---|
346 | else |
---|
347 | if ( "${obuild_platform_exe}" == "" ) then |
---|
348 | echo "Variable obuild_platform_exe not defined." |
---|
349 | exit |
---|
350 | endif |
---|
351 | set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin` |
---|
352 | if ( ${obuild_platform_result} == yes ) then |
---|
353 | if ( $?LD_LIBRARY_PATH ) then |
---|
354 | setenv LD_LIBRARY_PATH "${LD_LIBRARY_PATH}:${SNgeom2_home}/Darwin-i386/lib" |
---|
355 | else |
---|
356 | setenv LD_LIBRARY_PATH "${SNgeom2_home}/Darwin-i386/lib" |
---|
357 | endif |
---|
358 | endif |
---|
359 | unset obuild_platform_result |
---|
360 | endif |
---|
361 | unset obuild_platform_result |
---|
362 | |
---|
363 | if ( "${obuild_platform_exe}" == "" ) then |
---|
364 | echo "Variable obuild_platform_exe not defined." |
---|
365 | exit |
---|
366 | endif |
---|
367 | set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin` |
---|
368 | if ( ${obuild_platform_result} == yes ) then |
---|
369 | if ( "${obuild_platform_exe}" == "" ) then |
---|
370 | echo "Variable obuild_platform_exe not defined." |
---|
371 | exit |
---|
372 | endif |
---|
373 | set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin` |
---|
374 | if ( ${obuild_platform_result} == yes ) then |
---|
375 | if ( $?DYLD_LIBRARY_PATH ) then |
---|
376 | setenv DYLD_LIBRARY_PATH "${DYLD_LIBRARY_PATH}:${bhep_home}/Darwin/lib" |
---|
377 | else |
---|
378 | setenv DYLD_LIBRARY_PATH "${bhep_home}/Darwin/lib" |
---|
379 | endif |
---|
380 | endif |
---|
381 | unset obuild_platform_result |
---|
382 | else |
---|
383 | if ( "${obuild_platform_exe}" == "" ) then |
---|
384 | echo "Variable obuild_platform_exe not defined." |
---|
385 | exit |
---|
386 | endif |
---|
387 | set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin` |
---|
388 | if ( ${obuild_platform_result} == yes ) then |
---|
389 | if ( $?LD_LIBRARY_PATH ) then |
---|
390 | setenv LD_LIBRARY_PATH "${LD_LIBRARY_PATH}:${bhep_home}/Darwin/lib" |
---|
391 | else |
---|
392 | setenv LD_LIBRARY_PATH "${bhep_home}/Darwin/lib" |
---|
393 | endif |
---|
394 | endif |
---|
395 | unset obuild_platform_result |
---|
396 | endif |
---|
397 | unset obuild_platform_result |
---|
398 | |
---|
399 | if ( "${obuild_platform_exe}" == "" ) then |
---|
400 | echo "Variable obuild_platform_exe not defined." |
---|
401 | exit |
---|
402 | endif |
---|
403 | set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin` |
---|
404 | if ( ${obuild_platform_result} == yes ) then |
---|
405 | if ( $?DYLD_LIBRARY_PATH ) then |
---|
406 | setenv DYLD_LIBRARY_PATH "${DYLD_LIBRARY_PATH}:${obuild_snovis_path}/${obuild_dir_bin}" |
---|
407 | else |
---|
408 | setenv DYLD_LIBRARY_PATH "${obuild_snovis_path}/${obuild_dir_bin}" |
---|
409 | endif |
---|
410 | else |
---|
411 | if ( $?LD_LIBRARY_PATH ) then |
---|
412 | setenv LD_LIBRARY_PATH "${LD_LIBRARY_PATH}:${obuild_snovis_path}/${obuild_dir_bin}" |
---|
413 | else |
---|
414 | setenv LD_LIBRARY_PATH "${obuild_snovis_path}/${obuild_dir_bin}" |
---|
415 | endif |
---|
416 | endif |
---|
417 | unset obuild_platform_result |
---|
418 | |
---|
419 | if ( $?PATH ) then |
---|
420 | setenv PATH "${PATH}:${obuild_snovis_path}/${obuild_dir_bin}" |
---|
421 | else |
---|
422 | setenv PATH "${obuild_snovis_path}/${obuild_dir_bin}" |
---|
423 | endif |
---|
424 | |
---|
425 | unset obuild_snovis_path |
---|
426 | |
---|
427 | #FIXME unset obuild_platform |
---|
428 | #FIXME unset obuild_dir_bin |
---|