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

Last change on this file since 276 was 276, checked in by barrand, 17 years ago
File size: 11.5 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=bin_obuild
87  else
88    set obuild_dir_bin=${OBUILD_DIR_BIN}
89  endif
90else
91  set obuild_dir_bin=bin_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 CLHEP_home="/usr/local/CLHEP/2.0.3.1"
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 Geant4_home="/usr/local/geant4/8.2"
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 HDF5_home="/usr/local/HDF5/1.6.5"
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 OSC_home="/usr/local/OpenScientist/v16r0"
159endif
160unset obuild_platform_result
161if ( ! -e "${obuild_snovis_path}/${obuild_dir_bin}/obuild_find" ) then
162  if ( ! -e "${obuild_snovis_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_snovis_path}/${obuild_dir_bin}/obuild_find" "${obuild_snovis_path}/obuild/cpp/obuild_find.cpp"
180  unset obuild_find_compiler
181  if ( ! -e "${obuild_snovis_path}/${obuild_dir_bin}/obuild_find" ) then
182    echo "Program obuild_find not found."
183    exit
184  endif
185endif
186set obuild_find_exe="${obuild_snovis_path}/${obuild_dir_bin}/obuild_find"
187if ( "${obuild_find_exe}" == "" ) then
188  echo "Variable obuild_find_exe not defined."
189  exit
190endif
191set obuild_snova_path=`"${obuild_find_exe}" snova 'v2r0p0'`
192
193# Execute setup of used packages :
194source "${obuild_snova_path}/obuild/setup.csh"
195
196# Set environment variables of this package :
197setenv SNOVISROOT "${obuild_snovis_path}"
198setenv ONXROOT "${OSC_home}/Resources/OnX"
199setenv ONXLABROOT "${OSC_home}/Resources/OnXLab"
200setenv G4LABROOT "${obuild_snovis_path}/Resources/G4Lab"
201
202if ( "${obuild_platform_exe}" == "" ) then
203  echo "Variable obuild_platform_exe not defined."
204  exit
205endif
206set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin`
207if ( ${obuild_platform_result} == yes ) then
208if ( "${obuild_platform_exe}" == "" ) then
209  echo "Variable obuild_platform_exe not defined."
210  exit
211endif
212set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} UNIX`
213if ( ${obuild_platform_result} == yes ) then
214  if (  $?DYLD_LIBRARY_PATH ) then
215    setenv DYLD_LIBRARY_PATH "${DYLD_LIBRARY_PATH}:${HDF5_home}/lib"
216  else
217    setenv DYLD_LIBRARY_PATH "${HDF5_home}/lib"
218  endif
219endif
220unset obuild_platform_result
221else
222if ( "${obuild_platform_exe}" == "" ) then
223  echo "Variable obuild_platform_exe not defined."
224  exit
225endif
226set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} UNIX`
227if ( ${obuild_platform_result} == yes ) then
228  if (  $?LD_LIBRARY_PATH ) then
229    setenv LD_LIBRARY_PATH "${LD_LIBRARY_PATH}:${HDF5_home}/lib"
230  else
231    setenv LD_LIBRARY_PATH "${HDF5_home}/lib"
232  endif
233endif
234unset obuild_platform_result
235endif
236unset obuild_platform_result
237
238if ( "${obuild_platform_exe}" == "" ) then
239  echo "Variable obuild_platform_exe not defined."
240  exit
241endif
242set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin`
243if ( ${obuild_platform_result} == yes ) then
244if ( "${obuild_platform_exe}" == "" ) then
245  echo "Variable obuild_platform_exe not defined."
246  exit
247endif
248set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} UNIX`
249if ( ${obuild_platform_result} == yes ) then
250  if (  $?DYLD_LIBRARY_PATH ) then
251    setenv DYLD_LIBRARY_PATH "${DYLD_LIBRARY_PATH}:${CLHEP_home}/lib"
252  else
253    setenv DYLD_LIBRARY_PATH "${CLHEP_home}/lib"
254  endif
255endif
256unset obuild_platform_result
257else
258if ( "${obuild_platform_exe}" == "" ) then
259  echo "Variable obuild_platform_exe not defined."
260  exit
261endif
262set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} UNIX`
263if ( ${obuild_platform_result} == yes ) then
264  if (  $?LD_LIBRARY_PATH ) then
265    setenv LD_LIBRARY_PATH "${LD_LIBRARY_PATH}:${CLHEP_home}/lib"
266  else
267    setenv LD_LIBRARY_PATH "${CLHEP_home}/lib"
268  endif
269endif
270unset obuild_platform_result
271endif
272unset obuild_platform_result
273
274if ( "${obuild_platform_exe}" == "" ) then
275  echo "Variable obuild_platform_exe not defined."
276  exit
277endif
278set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin`
279if ( ${obuild_platform_result} == yes ) then
280if ( "${obuild_platform_exe}" == "" ) then
281  echo "Variable obuild_platform_exe not defined."
282  exit
283endif
284set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} UNIX`
285if ( ${obuild_platform_result} == yes ) then
286  if (  $?DYLD_LIBRARY_PATH ) then
287    setenv DYLD_LIBRARY_PATH "${DYLD_LIBRARY_PATH}:${Geant4_home}/lib"
288  else
289    setenv DYLD_LIBRARY_PATH "${Geant4_home}/lib"
290  endif
291endif
292unset obuild_platform_result
293else
294if ( "${obuild_platform_exe}" == "" ) then
295  echo "Variable obuild_platform_exe not defined."
296  exit
297endif
298set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} UNIX`
299if ( ${obuild_platform_result} == yes ) then
300  if (  $?LD_LIBRARY_PATH ) then
301    setenv LD_LIBRARY_PATH "${LD_LIBRARY_PATH}:${Geant4_home}/lib"
302  else
303    setenv LD_LIBRARY_PATH "${Geant4_home}/lib"
304  endif
305endif
306unset obuild_platform_result
307endif
308unset obuild_platform_result
309
310if ( "${obuild_platform_exe}" == "" ) then
311  echo "Variable obuild_platform_exe not defined."
312  exit
313endif
314set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin`
315if ( ${obuild_platform_result} == yes ) then
316if ( "${obuild_platform_exe}" == "" ) then
317  echo "Variable obuild_platform_exe not defined."
318  exit
319endif
320set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} UNIX`
321if ( ${obuild_platform_result} == yes ) then
322  if (  $?DYLD_LIBRARY_PATH ) then
323    setenv DYLD_LIBRARY_PATH "${DYLD_LIBRARY_PATH}:${OSC_home}/bin"
324  else
325    setenv DYLD_LIBRARY_PATH "${OSC_home}/bin"
326  endif
327endif
328unset obuild_platform_result
329else
330if ( "${obuild_platform_exe}" == "" ) then
331  echo "Variable obuild_platform_exe not defined."
332  exit
333endif
334set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} UNIX`
335if ( ${obuild_platform_result} == yes ) then
336  if (  $?LD_LIBRARY_PATH ) then
337    setenv LD_LIBRARY_PATH "${LD_LIBRARY_PATH}:${OSC_home}/bin"
338  else
339    setenv LD_LIBRARY_PATH "${OSC_home}/bin"
340  endif
341endif
342unset obuild_platform_result
343endif
344unset obuild_platform_result
345
346if ( "${obuild_platform_exe}" == "" ) then
347  echo "Variable obuild_platform_exe not defined."
348  exit
349endif
350set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin`
351if ( ${obuild_platform_result} == yes ) then
352  if (  $?DYLD_LIBRARY_PATH ) then
353    setenv DYLD_LIBRARY_PATH "${DYLD_LIBRARY_PATH}:${obuild_snovis_path}/${obuild_dir_bin}"
354  else
355    setenv DYLD_LIBRARY_PATH "${obuild_snovis_path}/${obuild_dir_bin}"
356  endif
357else
358  if (  $?LD_LIBRARY_PATH ) then
359    setenv LD_LIBRARY_PATH "${LD_LIBRARY_PATH}:${obuild_snovis_path}/${obuild_dir_bin}"
360  else
361    setenv LD_LIBRARY_PATH "${obuild_snovis_path}/${obuild_dir_bin}"
362  endif
363endif
364unset obuild_platform_result
365
366if (  $?PATH ) then
367  setenv PATH "${PATH}:${obuild_snovis_path}/${obuild_dir_bin}"
368else
369  setenv PATH "${obuild_snovis_path}/${obuild_dir_bin}"
370endif
371
372unset obuild_snovis_path
373
374#FIXME unset obuild_platform
375#FIXME unset obuild_dir_bin
Note: See TracBrowser for help on using the repository browser.