source: snovis/head/obuild/setup.csh @ 90

Last change on this file since 90 was 6, checked in by barrand, 17 years ago
File size: 13.7 KB
Line 
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
43set obuild_snovis_path="@@absolute_dir@@"
44
45
46if ( "${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
67endif
68
69if ( $?OBUILD_PLATFORM ) then
70  if ( "${OBUILD_PLATFORM}" == "" ) then
71    set obuild_platform=`uname`
72  else
73    set obuild_platform=${OBUILD_PLATFORM}
74  endif
75else
76  set obuild_platform=`uname`
77endif
78
79if ( "${obuild_platform}" == "" ) then
80  echo "obuild_platform variable not defined."
81  exit
82endif
83
84if ( $?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
90else
91  set obuild_dir_bin=${obuild_platform}_obuild
92endif
93
94if ( "${obuild_dir_bin}" == "" ) then
95  echo "obuild_dir_bin variable not defined."
96  exit
97endif
98
99if ( ! -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
123endif
124set obuild_platform_exe="${obuild_snovis_path}/${obuild_dir_bin}/obuild_platform"
125if ( "${obuild_platform_exe}" == "" ) then
126  echo "Variable obuild_platform_exe not defined."
127  exit
128endif
129set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} UNIX`
130if ( ${obuild_platform_result} == yes ) then
131set bhep_home="/Users/barrand/dev/exp/nemo/bhep/v1r4p1"
132endif
133unset obuild_platform_result
134if ( "${obuild_platform_exe}" == "" ) then
135  echo "Variable obuild_platform_exe not defined."
136  exit
137endif
138set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin`
139if ( ${obuild_platform_result} == yes ) then
140set bhep_platform="Darwin"
141endif
142unset obuild_platform_result
143if ( "${obuild_platform_exe}" == "" ) then
144  echo "Variable obuild_platform_exe not defined."
145  exit
146endif
147set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} UNIX`
148if ( ${obuild_platform_result} == yes ) then
149set GeomUtils_home="/Users/barrand/dev/exp/nemo/SNgeom/v0r1p0/build_area/GeomUtils"
150endif
151unset obuild_platform_result
152if ( "${obuild_platform_exe}" == "" ) then
153  echo "Variable obuild_platform_exe not defined."
154  exit
155endif
156set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin`
157if ( ${obuild_platform_result} == yes ) then
158set GeomUtils_platform="Darwin-i386"
159endif
160unset obuild_platform_result
161if ( "${obuild_platform_exe}" == "" ) then
162  echo "Variable obuild_platform_exe not defined."
163  exit
164endif
165set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} UNIX`
166if ( ${obuild_platform_result} == yes ) then
167set SNgeom2_home="/Users/barrand/dev/exp/nemo/SNgeom/v0r1p0/build_area/SNgeom2"
168endif
169unset obuild_platform_result
170if ( "${obuild_platform_exe}" == "" ) then
171  echo "Variable obuild_platform_exe not defined."
172  exit
173endif
174set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} UNIX`
175if ( ${obuild_platform_result} == yes ) then
176set snova_home="/Users/barrand/dev/exp/nemo/SNgeom/v0r1p0/build_area/snova"
177endif
178unset obuild_platform_result
179if ( "${obuild_platform_exe}" == "" ) then
180  echo "Variable obuild_platform_exe not defined."
181  exit
182endif
183set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} UNIX`
184if ( ${obuild_platform_result} == yes ) then
185set CLHEP_home="/usr/local/CLHEP/2.0.3.1"
186endif
187unset obuild_platform_result
188if ( "${obuild_platform_exe}" == "" ) then
189  echo "Variable obuild_platform_exe not defined."
190  exit
191endif
192set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} UNIX`
193if ( ${obuild_platform_result} == yes ) then
194set Geant4_home="/geant4/geant4.8.2"
195endif
196unset obuild_platform_result
197if ( "${obuild_platform_exe}" == "" ) then
198  echo "Variable obuild_platform_exe not defined."
199  exit
200endif
201set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin`
202if ( ${obuild_platform_result} == yes ) then
203set Geant4_work="${Geant4_home}/Darwin"
204endif
205unset obuild_platform_result
206if ( "${obuild_platform_exe}" == "" ) then
207  echo "Variable obuild_platform_exe not defined."
208  exit
209endif
210set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Linux`
211if ( ${obuild_platform_result} == yes ) then
212set Geant4_work="${Geant4_home}/slc3_gcc323"
213endif
214unset obuild_platform_result
215if ( "${obuild_platform_exe}" == "" ) then
216  echo "Variable obuild_platform_exe not defined."
217  exit
218endif
219set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin`
220if ( ${obuild_platform_result} == yes ) then
221set Geant4_system="Darwin-g++"
222endif
223unset obuild_platform_result
224if ( "${obuild_platform_exe}" == "" ) then
225  echo "Variable obuild_platform_exe not defined."
226  exit
227endif
228set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Linux`
229if ( ${obuild_platform_result} == yes ) then
230set Geant4_system="Linux-g++"
231endif
232unset obuild_platform_result
233if ( "${obuild_platform_exe}" == "" ) then
234  echo "Variable obuild_platform_exe not defined."
235  exit
236endif
237set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Windows_NT`
238if ( ${obuild_platform_result} == yes ) then
239set Geant4_system="WIN32-VC"
240endif
241unset obuild_platform_result
242if ( ! -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
266endif
267set obuild_find_exe="${obuild_snovis_path}/${obuild_dir_bin}/obuild_find"
268if ( "${obuild_find_exe}" == "" ) then
269  echo "Variable obuild_find_exe not defined."
270  exit
271endif
272set obuild_OnX_path=`"${obuild_find_exe}" OnX 'v17r*'`
273if ( "${obuild_find_exe}" == "" ) then
274  echo "Variable obuild_find_exe not defined."
275  exit
276endif
277set obuild_G4Lab_path=`"${obuild_find_exe}" G4Lab 'v8r*'`
278
279# Execute setup of used packages :
280source "${obuild_OnX_path}/obuild/setup.csh"
281
282source "${obuild_G4Lab_path}/obuild/setup.csh"
283
284# Set environment variables of this package :
285setenv SNOVISROOT "${obuild_snovis_path}"
286setenv G4RADIOACTIVEDATA "${Geant4_home}/data/RadiativeDecay3.1"
287setenv G4LEVELGAMMADATA "${Geant4_home}/data/PhotonEvaporation2.0"
288setenv G4LEDATA "${Geant4_home}/data/G4EMLOW4.2"
289setenv NeutronHPCrossSections "${Geant4_home}/data/G4NDL3.10"
290
291if ( "${obuild_platform_exe}" == "" ) then
292  echo "Variable obuild_platform_exe not defined."
293  exit
294endif
295set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin`
296if ( ${obuild_platform_result} == yes ) then
297if ( "${obuild_platform_exe}" == "" ) then
298  echo "Variable obuild_platform_exe not defined."
299  exit
300endif
301set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin`
302if ( ${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
308endif
309unset obuild_platform_result
310else
311if ( "${obuild_platform_exe}" == "" ) then
312  echo "Variable obuild_platform_exe not defined."
313  exit
314endif
315set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin`
316if ( ${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
322endif
323unset obuild_platform_result
324endif
325unset obuild_platform_result
326
327if ( "${obuild_platform_exe}" == "" ) then
328  echo "Variable obuild_platform_exe not defined."
329  exit
330endif
331set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin`
332if ( ${obuild_platform_result} == yes ) then
333if ( "${obuild_platform_exe}" == "" ) then
334  echo "Variable obuild_platform_exe not defined."
335  exit
336endif
337set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin`
338if ( ${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
344endif
345unset obuild_platform_result
346else
347if ( "${obuild_platform_exe}" == "" ) then
348  echo "Variable obuild_platform_exe not defined."
349  exit
350endif
351set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin`
352if ( ${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
358endif
359unset obuild_platform_result
360endif
361unset obuild_platform_result
362
363if ( "${obuild_platform_exe}" == "" ) then
364  echo "Variable obuild_platform_exe not defined."
365  exit
366endif
367set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin`
368if ( ${obuild_platform_result} == yes ) then
369if ( "${obuild_platform_exe}" == "" ) then
370  echo "Variable obuild_platform_exe not defined."
371  exit
372endif
373set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin`
374if ( ${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
380endif
381unset obuild_platform_result
382else
383if ( "${obuild_platform_exe}" == "" ) then
384  echo "Variable obuild_platform_exe not defined."
385  exit
386endif
387set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin`
388if ( ${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
394endif
395unset obuild_platform_result
396endif
397unset obuild_platform_result
398
399if ( "${obuild_platform_exe}" == "" ) then
400  echo "Variable obuild_platform_exe not defined."
401  exit
402endif
403set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin`
404if ( ${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
410else
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
416endif
417unset obuild_platform_result
418
419if (  $?PATH ) then
420  setenv PATH "${PATH}:${obuild_snovis_path}/${obuild_dir_bin}"
421else
422  setenv PATH "${obuild_snovis_path}/${obuild_dir_bin}"
423endif
424
425unset obuild_snovis_path
426
427#FIXME unset obuild_platform
428#FIXME unset obuild_dir_bin
Note: See TracBrowser for help on using the repository browser.