source: trunk/geant4/config/scripts/move.sh.SH @ 593

Last change on this file since 593 was 593, checked in by garnier, 17 years ago

r627@mac-90108: laurentgarnier | 2007-11-09 07:57:42 +0100
modif dans les includes directives

File size: 9.5 KB
Line 
1case $CONFIG in
2'')
3        if test -f config.sh; then TOP=.;
4        elif test -f ../config.sh; then TOP=..;
5        elif test -f ../../config.sh; then TOP=../..;
6        elif test -f ../../../config.sh; then TOP=../../..;
7        elif test -f ../../../../config.sh; then TOP=../../../..;
8        else
9                echo "Can't find config.sh."; exit 1
10        fi
11        . $TOP/config.sh
12        ;;
13esac
14: This forces SH files to create target in same directory as SH file.
15: This is so that make depend always knows where to find SH derivatives.
16case "$0" in
17*/*) cd `expr X$0 : 'X\(.*\)/'` ;;
18esac
19#echo "Extracting move.sh (with variable substitutions)"
20: This section of the file will have variable substitutions done on it.
21: Move anything that needs config subs from !NO!SUBS! section to !GROK!THIS!.
22: Protect any dollar signs and backticks that you do not want interpreted
23: by putting a backslash in front.  You may delete these comments.
24$spitshell >move.sh <<!GROK!THIS!
25######################################
26#
27# g4system.U
28#
29#+
30G4SYSTEM="$g4system"
31export G4SYSTEM
32echo "On this machine the G4SYSTEM=\$G4SYSTEM"
33
34#
35# g4dirs.U
36#
37#+
38G4INSTALL="$g4install"
39export G4INSTALL
40echo "On this machine the G4INSTALL=\$G4INSTALL"
41
42#+
43if [ X$g4include != X -a X$g4include != Xn ] ; then
44G4INCLUDE="$g4include"
45export G4INCLUDE
46echo "On this machine the G4INCLUDE=\$G4INCLUDE"
47fi
48
49#+
50if [ X$g4tmp != X ] ; then
51G4TMP="$g4tmp"
52export G4TMP
53echo "On this machine the G4TMP=\$G4TMP"
54fi
55
56#+
57if [ X$g4lib != X ] ; then 
58G4LIB="$g4lib"
59export G4LIB
60echo "On this machine the G4LIB=\$G4LIB"
61fi
62
63#+
64if [ X$g4lib != X ] ; then 
65G4BIN="$g4lib/../bin"
66export G4BIN
67fi
68
69#+
70if [ X$g4levelgammadata != X ] ; then 
71G4LEVELGAMMADATA="$g4levelgammadata"
72export G4LEVELGAMMADATA
73echo "On this machine the G4LEVELGAMMADATA=\$G4LEVELGAMMADATA"
74fi
75
76#+
77if [ X$g4radioactivedata != X ] ; then 
78G4RADIOACTIVEDATA="$g4radioactivedata"
79export G4RADIOACTIVEDATA
80echo "On this machine the G4RADIOACTIVEDATA=\$G4RADIOACTIVEDATA"
81fi
82
83#+
84if [ X$g4ledata != X ] ; then 
85G4LEDATA="$g4ledata"
86export G4LEDATA
87echo "On this machine the G4LEDATA=\$G4LEDATA"
88fi
89
90#+
91if [ X$g4neutronhpcrosssections != X ] ; then 
92G4NEUTRONHPDATA="$g4neutronhpcrosssections"
93export G4NEUTRONHPDATA
94echo "On this machine the G4NEUTRONHPDATA=\$G4NEUTRONHPDATA"
95fi
96
97#+
98#if [ X$g4elasticdata != X ] ; then
99#G4ELASTICDATA="$g4elasticdata"
100#export G4ELASTICDATA
101#echo "On this machine the G4ELASTICDATA=\$G4ELASTICDATA"
102#fi
103
104#
105# g4clhep.U
106#
107if [ X$g4clhep_base_dir != X/usr -o X$g4clhep_base_dir != X/usr/local ] ; then 
108CLHEP_BASE_DIR="$g4clhep_base_dir"
109export CLHEP_BASE_DIR
110echo "On this machine the CLHEP_BASE_DIR=\$CLHEP_BASE_DIR"
111fi
112
113#+
114if [ X$g4clhep_include_dir != X ] ; then 
115CLHEP_INCLUDE_DIR="$g4clhep_include_dir"
116export CLHEP_INCLUDE_DIR
117echo "On this machine the CLHEP_INCLUDE_DIR=\$CLHEP_INCLUDE_DIR"
118fi
119
120#+
121if [ X$g4clhep_lib_dir != X ] ; then 
122CLHEP_LIB_DIR="$g4clhep_lib_dir"
123export CLHEP_LIB_DIR
124echo "On this machine the CLHEP_LIB_DIR=\$CLHEP_LIB_DIR"
125fi
126
127#+
128if [ X$g4clhep_lib != X ] ; then 
129CLHEP_LIB="$g4clhep_lib"
130export CLHEP_LIB
131echo "On this machine the CLHEP_LIB=\$CLHEP_LIB"
132fi
133
134#+
135#
136# g4debug
137#
138if [ X$g4debug = Xy ] ; then 
139G4DEBUG=1
140export G4DEBUG
141echo "On this machine the G4DEBUG=\$G4DEBUG"
142fi
143
144#
145# g4analysis
146#
147#+
148if [ X$g4wanalysis_use = Xy ] ; then
149G4ANALYSIS_USE=1
150export G4ANALYSIS_USE
151echo "On this machine the G4ANALYSIS_USE=\$G4ANALYSIS_USE"
152fi 
153
154#
155# g4ui
156#
157#+
158if [ X$g4ui_build_xaw_session = Xy ] ; then
159G4UI_BUILD_XAW_SESSION=1
160export G4UI_BUILD_XAW_SESSION
161echo "On this machine the G4UI_BUILD_XAW_SESSION=\$G4UI_BUILD_XAW_SESSION"
162fi 
163
164#+
165if [ X$g4ui_use_xaw = Xy ] ; then
166G4UI_USE_XAW=1
167export G4UI_USE_XAW
168echo "On this machine the G4UI_USE_XAW=\$G4UI_USE_XAW"
169fi 
170
171#+
172if [ X$g4ui_build_xm_session = Xy ] ; then
173G4UI_BUILD_XM_SESSION=1
174export G4UI_BUILD_XM_SESSION
175echo "On this machine the G4UI_BUILD_XM_SESSION=\$G4UI_BUILD_XM_SESSION"
176fi 
177
178#+
179if [ X$g4ui_use_xm = Xy ] ; then
180G4UI_USE_XM=1
181export G4UI_USE_XM
182echo "On this machine the G4UI_USE_XM=\$G4UI_USE_XM"
183fi 
184
185#+
186if [ X$g4ui_build_win32_session = Xy ] ; then
187G4UI_BUILD_WIN32_SESSION=1
188export G4UI_BUILD_WIN32_SESSION
189echo "On this machine the G4UI_BUILD_WIN32_SESSION=\$G4UI_BUILD_WIN32_SESSION"
190fi 
191
192#+
193if [ X$g4ui_use_win32 = Xy ] ; then
194G4UI_USE_WIN32=1
195export G4UI_USE_WIN32
196echo "On this machine the G4UI_USE_WIN32=\$G4UI_USE_WIN32"
197fi 
198
199#
200# g4vis
201#
202#+
203if [ X$g4vis_build_dawn_driver = Xy ] ; then
204G4VIS_BUILD_DAWN_DRIVER=1
205export G4VIS_BUILD_DAWN_DRIVER
206echo "On this machine the G4VIS_BUILD_DAWN_DRIVER=\$G4VIS_BUILD_DAWN_DRIVER"
207fi 
208
209#+
210if [ X$g4vis_build_openglx_driver = Xy ] ; then
211G4VIS_BUILD_OPENGLX_DRIVER=1
212export G4VIS_BUILD_OPENGLX_DRIVER
213echo "On this machine the G4VIS_BUILD_OPENGLX_DRIVER=\$G4VIS_BUILD_OPENGLX_DRIVER"
214fi 
215
216#+
217if [ X$g4vis_build_openglxm_driver = Xy ] ; then
218G4VIS_BUILD_OPENGLXM_DRIVER=1
219export G4VIS_BUILD_OPENGLXM_DRIVER
220echo "On this machine the G4VIS_BUILD_OPENGLXM_DRIVER=\$G4VIS_BUILD_OPENGLXM_DRIVER"
221fi 
222
223#+
224if [ X$g4vis_build_openglwin32_driver = Xy ] ; then
225G4VIS_BUILD_OPENGLWIN32_DRIVER=1
226export G4VIS_BUILD_OPENGLWIN32_DRIVER
227echo "On this machine the G4VIS_BUILD_OPENGLWIN32_DRIVER=\$G4VIS_BUILD_OPENGLWIN32_DRIVER"
228fi 
229
230#+
231if [ X$g4vis_build_oix_driver = Xy ] ; then
232G4VIS_BUILD_OIX_DRIVER=1
233export G4VIS_BUILD_OIX_DRIVER
234echo "On this machine the G4VIS_BUILD_OIX_DRIVER=\$G4VIS_BUILD_OIX_DRIVER"
235fi 
236
237#+
238if [ X$g4vis_build_oiwin32_driver = Xy ] ; then
239G4VIS_BUILD_OIWIN32_DRIVER=1
240export G4VIS_BUILD_OIWIN32_DRIVER
241echo "On this machine the G4VIS_BUILD_OIWIN32_DRIVER=\$G4VIS_BUILD_OIWIN32_DRIVER"
242fi 
243
244#+
245if [ X$g4vis_build_vrml_driver = Xy ] ; then
246G4VIS_BUILD_VRML_DRIVER=1
247export G4VIS_BUILD_VRML_DRIVER
248echo "On this machine the G4VIS_BUILD_VRML_DRIVER=\$G4VIS_BUILD_VRML_DRIVER"
249fi 
250
251#+
252if [ X$g4vis_use_dawn = Xy ] ; then
253G4VIS_USE_DAWN=1
254export G4VIS_USE_DAWN
255echo "On this machine the G4VIS_USE_DAWN=\$G4VIS_USE_DAWN"
256fi 
257
258#+
259if [ X$g4vis_use_openglx = Xy ] ; then
260G4VIS_USE_OPENGLX=1
261export G4VIS_USE_OPENGLX
262echo "On this machine the G4VIS_USE_OPENGLX=\$G4VIS_USE_OPENGLX"
263fi 
264
265#+
266if [ X$g4vis_use_openglxm = Xy ] ; then
267G4VIS_USE_OPENGLXM=1
268export G4VIS_USE_OPENGLXM
269echo "On this machine the G4VIS_USE_OPENGLXM=\$G4VIS_USE_OPENGLXM"
270fi 
271
272#+
273if [ X$g4vis_use_openglwin32 = Xy ] ; then
274G4VIS_USE_OPENGLWIN32=1
275export G4VIS_USE_OPENGLWIN32
276echo "On this machine the G4VIS_USE_OPENGLWIN32=\$G4VIS_USE_OPENGLWIN32"
277fi 
278
279#+
280if [ X$g4vis_use_oix = Xy ] ; then
281G4VIS_USE_OIX=1
282export G4VIS_USE_OIX
283echo "On this machine the G4VIS_USE_OIX=\$G4VIS_USE_OIX"
284fi 
285
286#+
287if [ X$g4vis_use_oiwin32 = Xy ] ; then
288G4VIS_USE_OIWIN32=1
289export G4VIS_USE_OIWIN32
290echo "On this machine the G4VIS_USE_OIWIN32=\$G4VIS_USE_OIWIN32"
291fi 
292
293#+
294if [ X$g4vis_use_vrml = Xy ] ; then
295G4VIS_USE_VRML=1
296export G4VIS_USE_VRML
297echo "On this machine the G4VIS_USE_VRML=\$G4VIS_USE_VRML"
298fi 
299
300#+
301if [ X$g4vis_oglhome != X ] ; then
302OGLHOME="$g4vis_oglhome"
303export OGLHOME
304echo "On this machine the OGLHOME=\$OGLHOME"
305fi 
306
307#
308# Use G3TOG4 module
309#
310#+
311if [ X$g4wlib_build_g3tog4 = Xy ] ; then
312G4LIB_BUILD_G3TOG4=1
313export G4LIB_BUILD_G3TOG4
314echo "On this machine the G4LIB_BUILD_G3TOG4=\$G4LIB_BUILD_G3TOG4"
315fi 
316
317if [ X$g4w_use_g3tog4 = Xy ] ; then
318G4LIB_USE_G3TOG4=1
319export G4LIB_USE_G3TOG4
320echo "On this machine the G4LIB_USE_G3TOG4=\$G4LIB_USE_G3TOG4"
321fi 
322
323#
324# Use ZLIB module
325#
326#+
327if [ X$g4wlib_build_zlib = Xy ] ; then
328G4LIB_BUILD_ZLIB=1
329export G4LIB_BUILD_ZLIB
330echo "On this machine the G4LIB_BUILD_ZLIB=\$G4LIB_BUILD_ZLIB"
331fi 
332
333if [ X$g4w_use_zlib = Xy ] ; then
334G4LIB_USE_ZLIB=1
335export G4LIB_USE_ZLIB
336echo "On this machine the G4LIB_USE_ZLIB=\$G4LIB_USE_ZLIB"
337fi 
338
339
340#+
341#
342# g4shared
343#
344if [ X$g4lib_build_shared = Xy ] ; then
345G4LIB_BUILD_SHARED=1
346export G4LIB_BUILD_SHARED
347echo "On this machine the G4LIB_BUILD_SHARED=\$G4LIB_BUILD_SHARED"
348fi 
349
350if [ X$g4lib_build_static = Xy ] ; then
351G4LIB_BUILD_STATIC=1
352export G4LIB_BUILD_STATIC
353echo "On this machine the G4LIB_BUILD_STATIC=\$G4LIB_BUILD_STATIC"
354fi 
355
356#+
357#
358# g4granular
359#
360if [ X$g4lib_use_granular = Xy ] ; then
361G4LIB_USE_GRANULAR=1
362export G4LIB_USE_GRANULAR
363echo "On this machine the G4LIB_USE_GRANULAR=\$G4LIB_USE_GRANULAR"
364fi 
365
366#####################################################################
367
368#####################################################################
369
370echo ""
371echo "Starting installation..."
372echo ""
373
374cd $g4install
375#echo `pwd`
376
377
378# Remove 'verbosity' in 'tar' command
379# If not INCLUDE then install full tree in 'src' directory!
380#
381if [ X$g4includes_flag = Xn ] ; then
382if [ X$g4install != X$g4final_install ] ; then
383echo ""
384echo "Installing sources and headers..."
385echo ""
386mkdir -p $g4final_install/src/geant4/
387tar cf - Configure config/ source/ environments/ examples/ include/ |(cd $g4final_install/src/geant4/; tar xf -)
388fi
389fi
390
391########################################
392# There is no env!
393if [ X$g4includes_flag = Xy ] ; then
394
395if [ X$g4install != X$g4final_install ] ; then
396echo ""
397echo "Installing sources..."
398echo ""
399
400mkdir -p $g4final_install/src/geant4/
401tar cf - Configure config/ source/ environments/ examples/ |(cd $g4final_install/src/geant4/; tar xf -)
402fi
403
404echo ""
405echo "Installing headers..."
406echo ""
407cd $g4install/source
408$g4make includes dependencies=""
409fi
410
411# Move libraries
412if [ X$g4install != X$g4final_install ] ; then
413echo ""
414echo "Installing libraries..."
415echo ""
416mkdir -p $g4final_install/lib/geant4
417cd $g4install/lib
418tar cf - $g4system |(cd $g4final_install/lib/geant4; tar xf -)
419fi
420
421# For the reason of strange behaivior for DOTted directory...
422mkdir -p $g4final_install/src/geant4/.config
423cd $g4install/.config
424tar cf - . |(cd $g4final_install/src/geant4/.config; tar xf -)
425
426
427!GROK!THIS!
428
429: In the following dollars and backticks do not need the extra backslash.
430$spitshell >>move.sh <<'!NO!SUBS!'
431!NO!SUBS!
432chmod 755 move.sh
433$eunicefix move.sh
434
Note: See TracBrowser for help on using the repository browser.