source: snovis/trunk/obuild/setup.csh @ 134

Last change on this file since 134 was 134, checked in by barrand, 17 years ago
File size: 10.0 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 v1r1.
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} Darwin`
130if ( ${obuild_platform_result} == yes ) then
131set snova_platform="Darwin"
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} UNIX`
139if ( ${obuild_platform_result} == yes ) then
140set bhep_home="/Users/barrand/dev/exp/nemo/bhep/v1r4p2"
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 snova_home="/Users/barrand/dev/exp/nemo/snova/v2r0p0"
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} UNIX`
157if ( ${obuild_platform_result} == yes ) then
158set CLHEP_home="/usr/local/CLHEP/2.0.3.1"
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 Geant4_home="/usr/local/geant4/8.2"
168endif
169unset obuild_platform_result
170if ( ! -e "${obuild_snovis_path}/${obuild_dir_bin}/obuild_find" ) then
171  if ( ! -e "${obuild_snovis_path}/obuild/cpp/obuild_find.cpp" ) then
172    echo "Program source obuild_find.cpp not found."
173    exit
174  endif
175  if ( $?obuild_cxx_command ) then
176    if ( "${obuild_cxx_command}" == "" ) then
177      if (  $?OBUILD_CXX ) then
178        set obuild_find_compiler=${OBUILD_CXX}
179      else
180        set obuild_find_compiler=c++
181      endif
182    else
183      set obuild_find_compiler=${obuild_cxx_command}
184    endif
185  else
186    set obuild_find_compiler=c++
187  endif
188  ${obuild_find_compiler} -o "${obuild_snovis_path}/${obuild_dir_bin}/obuild_find" "${obuild_snovis_path}/obuild/cpp/obuild_find.cpp"
189  unset obuild_find_compiler
190  if ( ! -e "${obuild_snovis_path}/${obuild_dir_bin}/obuild_find" ) then
191    echo "Program obuild_find not found."
192    exit
193  endif
194endif
195set obuild_find_exe="${obuild_snovis_path}/${obuild_dir_bin}/obuild_find"
196if ( "${obuild_find_exe}" == "" ) then
197  echo "Variable obuild_find_exe not defined."
198  exit
199endif
200set obuild_OnX_path=`"${obuild_find_exe}" OnX 'v17r*'`
201if ( "${obuild_find_exe}" == "" ) then
202  echo "Variable obuild_find_exe not defined."
203  exit
204endif
205set obuild_G4Lab_path=`"${obuild_find_exe}" G4Lab 'v8r*'`
206
207# Execute setup of used packages :
208source "${obuild_OnX_path}/obuild/setup.csh"
209
210source "${obuild_G4Lab_path}/obuild/setup.csh"
211
212# Set environment variables of this package :
213setenv SNOVISROOT "${obuild_snovis_path}"
214setenv G4RADIOACTIVEDATA "${Geant4_home}/data/RadiativeDecay3.1"
215setenv G4LEVELGAMMADATA "${Geant4_home}/data/PhotonEvaporation2.0"
216setenv G4LEDATA "${Geant4_home}/data/G4EMLOW4.2"
217setenv NeutronHPCrossSections "${Geant4_home}/data/G4NDL3.10"
218
219if ( "${obuild_platform_exe}" == "" ) then
220  echo "Variable obuild_platform_exe not defined."
221  exit
222endif
223set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin`
224if ( ${obuild_platform_result} == yes ) then
225if ( "${obuild_platform_exe}" == "" ) then
226  echo "Variable obuild_platform_exe not defined."
227  exit
228endif
229set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin`
230if ( ${obuild_platform_result} == yes ) then
231  if (  $?DYLD_LIBRARY_PATH ) then
232    setenv DYLD_LIBRARY_PATH "${DYLD_LIBRARY_PATH}:${bhep_home}/Darwin"
233  else
234    setenv DYLD_LIBRARY_PATH "${bhep_home}/Darwin"
235  endif
236endif
237unset obuild_platform_result
238else
239if ( "${obuild_platform_exe}" == "" ) then
240  echo "Variable obuild_platform_exe not defined."
241  exit
242endif
243set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin`
244if ( ${obuild_platform_result} == yes ) then
245  if (  $?LD_LIBRARY_PATH ) then
246    setenv LD_LIBRARY_PATH "${LD_LIBRARY_PATH}:${bhep_home}/Darwin"
247  else
248    setenv LD_LIBRARY_PATH "${bhep_home}/Darwin"
249  endif
250endif
251unset obuild_platform_result
252endif
253unset obuild_platform_result
254
255if ( "${obuild_platform_exe}" == "" ) then
256  echo "Variable obuild_platform_exe not defined."
257  exit
258endif
259set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin`
260if ( ${obuild_platform_result} == yes ) then
261if ( "${obuild_platform_exe}" == "" ) then
262  echo "Variable obuild_platform_exe not defined."
263  exit
264endif
265set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin`
266if ( ${obuild_platform_result} == yes ) then
267  if (  $?DYLD_LIBRARY_PATH ) then
268    setenv DYLD_LIBRARY_PATH "${DYLD_LIBRARY_PATH}:${snova_home}/Darwin"
269  else
270    setenv DYLD_LIBRARY_PATH "${snova_home}/Darwin"
271  endif
272endif
273unset obuild_platform_result
274else
275if ( "${obuild_platform_exe}" == "" ) then
276  echo "Variable obuild_platform_exe not defined."
277  exit
278endif
279set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin`
280if ( ${obuild_platform_result} == yes ) then
281  if (  $?LD_LIBRARY_PATH ) then
282    setenv LD_LIBRARY_PATH "${LD_LIBRARY_PATH}:${snova_home}/Darwin"
283  else
284    setenv LD_LIBRARY_PATH "${snova_home}/Darwin"
285  endif
286endif
287unset obuild_platform_result
288endif
289unset obuild_platform_result
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
297  if (  $?DYLD_LIBRARY_PATH ) then
298    setenv DYLD_LIBRARY_PATH "${DYLD_LIBRARY_PATH}:${obuild_snovis_path}/${obuild_dir_bin}"
299  else
300    setenv DYLD_LIBRARY_PATH "${obuild_snovis_path}/${obuild_dir_bin}"
301  endif
302else
303  if (  $?LD_LIBRARY_PATH ) then
304    setenv LD_LIBRARY_PATH "${LD_LIBRARY_PATH}:${obuild_snovis_path}/${obuild_dir_bin}"
305  else
306    setenv LD_LIBRARY_PATH "${obuild_snovis_path}/${obuild_dir_bin}"
307  endif
308endif
309unset obuild_platform_result
310
311if (  $?PATH ) then
312  setenv PATH "${PATH}:${obuild_snovis_path}/${obuild_dir_bin}"
313else
314  setenv PATH "${obuild_snovis_path}/${obuild_dir_bin}"
315endif
316
317unset obuild_snovis_path
318
319#FIXME unset obuild_platform
320#FIXME unset obuild_dir_bin
Note: See TracBrowser for help on using the repository browser.