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

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

r647@mac-90108: laurentgarnier | 2007-11-15 11:32:46 +0100
Ok en Qt 4.3.0

File size: 10.0 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#+
98if [ X$g4abladata != X ] ; then 
99G4ABLADATA="$g4abladata"
100export G4ABLADATA
101echo "On this machine the G4ABLADATA=\$G4ABLADATA"
102fi
103
104
105
106#+
107#if [ X$g4elasticdata != X ] ; then
108#G4ELASTICDATA="$g4elasticdata"
109#export G4ELASTICDATA
110#echo "On this machine the G4ELASTICDATA=\$G4ELASTICDATA"
111#fi
112
113#
114# g4clhep.U
115#
116if [ X$g4clhep_base_dir != X/usr -o X$g4clhep_base_dir != X/usr/local ] ; then 
117CLHEP_BASE_DIR="$g4clhep_base_dir"
118export CLHEP_BASE_DIR
119echo "On this machine the CLHEP_BASE_DIR=\$CLHEP_BASE_DIR"
120fi
121
122#+
123if [ X$g4clhep_include_dir != X ] ; then 
124CLHEP_INCLUDE_DIR="$g4clhep_include_dir"
125export CLHEP_INCLUDE_DIR
126echo "On this machine the CLHEP_INCLUDE_DIR=\$CLHEP_INCLUDE_DIR"
127fi
128
129#+
130if [ X$g4clhep_lib_dir != X ] ; then 
131CLHEP_LIB_DIR="$g4clhep_lib_dir"
132export CLHEP_LIB_DIR
133echo "On this machine the CLHEP_LIB_DIR=\$CLHEP_LIB_DIR"
134fi
135
136#+
137if [ X$g4clhep_lib != X ] ; then 
138CLHEP_LIB="$g4clhep_lib"
139export CLHEP_LIB
140echo "On this machine the CLHEP_LIB=\$CLHEP_LIB"
141fi
142
143#+
144#
145# g4debug
146#
147if [ X$g4debug = Xy ] ; then 
148G4DEBUG=1
149export G4DEBUG
150echo "On this machine the G4DEBUG=\$G4DEBUG"
151fi
152
153#
154# g4analysis
155#
156#+
157if [ X$g4wanalysis_use = Xy ] ; then
158G4ANALYSIS_USE=1
159export G4ANALYSIS_USE
160echo "On this machine the G4ANALYSIS_USE=\$G4ANALYSIS_USE"
161fi 
162
163#
164# g4ui
165#
166#+
167if [ X$g4ui_build_xaw_session = Xy ] ; then
168G4UI_BUILD_XAW_SESSION=1
169export G4UI_BUILD_XAW_SESSION
170echo "On this machine the G4UI_BUILD_XAW_SESSION=\$G4UI_BUILD_XAW_SESSION"
171fi 
172
173#+
174if [ X$g4ui_use_xaw = Xy ] ; then
175G4UI_USE_XAW=1
176export G4UI_USE_XAW
177echo "On this machine the G4UI_USE_XAW=\$G4UI_USE_XAW"
178fi 
179
180#+
181if [ X$g4ui_build_xm_session = Xy ] ; then
182G4UI_BUILD_XM_SESSION=1
183export G4UI_BUILD_XM_SESSION
184echo "On this machine the G4UI_BUILD_XM_SESSION=\$G4UI_BUILD_XM_SESSION"
185fi 
186
187#+
188if [ X$g4ui_use_xm = Xy ] ; then
189G4UI_USE_XM=1
190export G4UI_USE_XM
191echo "On this machine the G4UI_USE_XM=\$G4UI_USE_XM"
192fi 
193
194#+
195if [ X$g4ui_build_win32_session = Xy ] ; then
196G4UI_BUILD_WIN32_SESSION=1
197export G4UI_BUILD_WIN32_SESSION
198echo "On this machine the G4UI_BUILD_WIN32_SESSION=\$G4UI_BUILD_WIN32_SESSION"
199fi 
200
201#+
202if [ X$g4ui_use_win32 = Xy ] ; then
203G4UI_USE_WIN32=1
204export G4UI_USE_WIN32
205echo "On this machine the G4UI_USE_WIN32=\$G4UI_USE_WIN32"
206fi 
207
208#
209# g4vis
210#
211#+
212if [ X$g4vis_build_dawn_driver = Xy ] ; then
213G4VIS_BUILD_DAWN_DRIVER=1
214export G4VIS_BUILD_DAWN_DRIVER
215echo "On this machine the G4VIS_BUILD_DAWN_DRIVER=\$G4VIS_BUILD_DAWN_DRIVER"
216fi 
217
218#+
219if [ X$g4vis_build_openglx_driver = Xy ] ; then
220G4VIS_BUILD_OPENGLX_DRIVER=1
221export G4VIS_BUILD_OPENGLX_DRIVER
222echo "On this machine the G4VIS_BUILD_OPENGLX_DRIVER=\$G4VIS_BUILD_OPENGLX_DRIVER"
223fi 
224
225#+
226if [ X$g4vis_build_openglxm_driver = Xy ] ; then
227G4VIS_BUILD_OPENGLXM_DRIVER=1
228export G4VIS_BUILD_OPENGLXM_DRIVER
229echo "On this machine the G4VIS_BUILD_OPENGLXM_DRIVER=\$G4VIS_BUILD_OPENGLXM_DRIVER"
230fi 
231
232#+
233if [ X$g4vis_build_openglwin32_driver = Xy ] ; then
234G4VIS_BUILD_OPENGLWIN32_DRIVER=1
235export G4VIS_BUILD_OPENGLWIN32_DRIVER
236echo "On this machine the G4VIS_BUILD_OPENGLWIN32_DRIVER=\$G4VIS_BUILD_OPENGLWIN32_DRIVER"
237fi 
238
239#+
240if [ X$g4vis_build_oix_driver = Xy ] ; then
241G4VIS_BUILD_OIX_DRIVER=1
242export G4VIS_BUILD_OIX_DRIVER
243echo "On this machine the G4VIS_BUILD_OIX_DRIVER=\$G4VIS_BUILD_OIX_DRIVER"
244fi 
245
246#+
247if [ X$g4vis_build_oiwin32_driver = Xy ] ; then
248G4VIS_BUILD_OIWIN32_DRIVER=1
249export G4VIS_BUILD_OIWIN32_DRIVER
250echo "On this machine the G4VIS_BUILD_OIWIN32_DRIVER=\$G4VIS_BUILD_OIWIN32_DRIVER"
251fi 
252
253#+
254if [ X$g4vis_build_vrml_driver = Xy ] ; then
255G4VIS_BUILD_VRML_DRIVER=1
256export G4VIS_BUILD_VRML_DRIVER
257echo "On this machine the G4VIS_BUILD_VRML_DRIVER=\$G4VIS_BUILD_VRML_DRIVER"
258fi 
259
260#+
261if [ X$g4vis_use_dawn = Xy ] ; then
262G4VIS_USE_DAWN=1
263export G4VIS_USE_DAWN
264echo "On this machine the G4VIS_USE_DAWN=\$G4VIS_USE_DAWN"
265fi 
266
267#+
268if [ X$g4vis_use_openglx = Xy ] ; then
269G4VIS_USE_OPENGLX=1
270export G4VIS_USE_OPENGLX
271echo "On this machine the G4VIS_USE_OPENGLX=\$G4VIS_USE_OPENGLX"
272fi 
273
274#+
275if [ X$g4vis_use_openglxm = Xy ] ; then
276G4VIS_USE_OPENGLXM=1
277export G4VIS_USE_OPENGLXM
278echo "On this machine the G4VIS_USE_OPENGLXM=\$G4VIS_USE_OPENGLXM"
279fi 
280
281#+
282if [ X$g4vis_use_openglwin32 = Xy ] ; then
283G4VIS_USE_OPENGLWIN32=1
284export G4VIS_USE_OPENGLWIN32
285echo "On this machine the G4VIS_USE_OPENGLWIN32=\$G4VIS_USE_OPENGLWIN32"
286fi 
287
288#+
289if [ X$g4vis_use_oix = Xy ] ; then
290G4VIS_USE_OIX=1
291export G4VIS_USE_OIX
292echo "On this machine the G4VIS_USE_OIX=\$G4VIS_USE_OIX"
293fi 
294
295#+
296if [ X$g4vis_use_oiwin32 = Xy ] ; then
297G4VIS_USE_OIWIN32=1
298export G4VIS_USE_OIWIN32
299echo "On this machine the G4VIS_USE_OIWIN32=\$G4VIS_USE_OIWIN32"
300fi 
301
302#+
303if [ X$g4vis_use_vrml = Xy ] ; then
304G4VIS_USE_VRML=1
305export G4VIS_USE_VRML
306echo "On this machine the G4VIS_USE_VRML=\$G4VIS_USE_VRML"
307fi 
308
309#+
310if [ X$g4vis_oglhome != X ] ; then
311OGLHOME="$g4vis_oglhome"
312export OGLHOME
313echo "On this machine the OGLHOME=\$OGLHOME"
314fi 
315
316
317#
318# Use GDML module
319#
320#+
321if [ X$g4lib_build_gdml = Xy ] ; then
322G4LIB_BUILD_GDML=1
323export G4LIB_BUILD_GDML
324echo "On this machine the G4LIB_BUILD_GDML=\$G4LIB_BUILD_GDML"
325fi 
326
327if [ X$g4lib_build_gdml = Xy ] ; then
328XERCESCROOT=$g4gdml_xercesc_root
329export XERCESCROOT
330echo "On this machine the XERCESCROOT=\$XERCESCROOT"
331fi 
332
333
334
335#
336# Use G3TOG4 module
337#
338#+
339if [ X$g4wlib_build_g3tog4 = Xy ] ; then
340G4LIB_BUILD_G3TOG4=1
341export G4LIB_BUILD_G3TOG4
342echo "On this machine the G4LIB_BUILD_G3TOG4=\$G4LIB_BUILD_G3TOG4"
343fi 
344
345if [ X$g4w_use_g3tog4 = Xy ] ; then
346G4LIB_USE_G3TOG4=1
347export G4LIB_USE_G3TOG4
348echo "On this machine the G4LIB_USE_G3TOG4=\$G4LIB_USE_G3TOG4"
349fi 
350
351#
352# Use ZLIB module
353#
354#+
355if [ X$g4wlib_build_zlib = Xy ] ; then
356G4LIB_BUILD_ZLIB=1
357export G4LIB_BUILD_ZLIB
358echo "On this machine the G4LIB_BUILD_ZLIB=\$G4LIB_BUILD_ZLIB"
359fi 
360
361if [ X$g4w_use_zlib = Xy ] ; then
362G4LIB_USE_ZLIB=1
363export G4LIB_USE_ZLIB
364echo "On this machine the G4LIB_USE_ZLIB=\$G4LIB_USE_ZLIB"
365fi 
366
367
368#+
369#
370# g4shared
371#
372if [ X$g4lib_build_shared = Xy ] ; then
373G4LIB_BUILD_SHARED=1
374export G4LIB_BUILD_SHARED
375echo "On this machine the G4LIB_BUILD_SHARED=\$G4LIB_BUILD_SHARED"
376fi 
377
378if [ X$g4lib_build_static = Xy ] ; then
379G4LIB_BUILD_STATIC=1
380export G4LIB_BUILD_STATIC
381echo "On this machine the G4LIB_BUILD_STATIC=\$G4LIB_BUILD_STATIC"
382fi 
383
384#+
385#
386# g4granular
387#
388if [ X$g4lib_use_granular = Xy ] ; then
389G4LIB_USE_GRANULAR=1
390export G4LIB_USE_GRANULAR
391echo "On this machine the G4LIB_USE_GRANULAR=\$G4LIB_USE_GRANULAR"
392fi 
393
394#####################################################################
395
396#####################################################################
397
398echo ""
399echo "Starting installation..."
400echo ""
401
402cd $g4install
403#echo `pwd`
404
405
406# Remove 'verbosity' in 'tar' command
407# If not INCLUDE then install full tree in 'src' directory!
408#
409if [ X$g4includes_flag = Xn ] ; then
410if [ X$g4install != X$g4final_install ] ; then
411echo ""
412echo "Installing sources and headers..."
413echo ""
414mkdir -p $g4final_install/src/geant4/
415tar cf - Configure config/ source/ environments/ examples/ include/ |(cd $g4final_install/src/geant4/; tar xf -)
416fi
417fi
418
419########################################
420# There is no env!
421if [ X$g4includes_flag = Xy ] ; then
422
423if [ X$g4install != X$g4final_install ] ; then
424echo ""
425echo "Installing sources..."
426echo ""
427
428mkdir -p $g4final_install/src/geant4/
429tar cf - Configure config/ source/ environments/ examples/ |(cd $g4final_install/src/geant4/; tar xf -)
430fi
431
432echo ""
433echo "Installing headers..."
434echo ""
435cd $g4install/source
436$g4make includes dependencies=""
437fi
438
439# Move libraries
440if [ X$g4install != X$g4final_install ] ; then
441echo ""
442echo "Installing libraries..."
443echo ""
444mkdir -p $g4final_install/lib/geant4
445cd $g4install/lib
446tar cf - $g4system |(cd $g4final_install/lib/geant4; tar xf -)
447fi
448
449# For the reason of strange behaivior for DOTted directory...
450mkdir -p $g4final_install/src/geant4/.config
451cd $g4install/.config
452tar cf - . |(cd $g4final_install/src/geant4/.config; tar xf -)
453
454
455!GROK!THIS!
456
457: In the following dollars and backticks do not need the extra backslash.
458$spitshell >>move.sh <<'!NO!SUBS!'
459!NO!SUBS!
460chmod 755 move.sh
461$eunicefix move.sh
462
Note: See TracBrowser for help on using the repository browser.