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

Last change on this file since 689 was 689, checked in by garnier, 16 years ago

maj par rapport a cvs

File size: 10.7 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#+
210if [ X$g4ui_build_qt_session = Xy ] ; then
211G4UI_BUILD_QT_SESSION=1
212export G4UI_BUILD_QT_SESSION
213echo "On this machine the G4UI_BUILD_QT_SESSION=\$G4UI_BUILD_QT_SESSION"
214fi 
215
216#+
217if [ X$g4ui_use_qt = Xy ] ; then
218G4UI_USE_QT=1
219export G4UI_USE_QT
220echo "On this machine the G4UI_USE_QT=\$G4UI_USE_QT"
221fi 
222
223
224
225#
226# g4vis
227#
228#+
229if [ X$g4vis_build_dawn_driver = Xy ] ; then
230G4VIS_BUILD_DAWN_DRIVER=1
231export G4VIS_BUILD_DAWN_DRIVER
232echo "On this machine the G4VIS_BUILD_DAWN_DRIVER=\$G4VIS_BUILD_DAWN_DRIVER"
233fi 
234
235#+
236if [ X$g4vis_build_openglx_driver = Xy ] ; then
237G4VIS_BUILD_OPENGLX_DRIVER=1
238export G4VIS_BUILD_OPENGLX_DRIVER
239echo "On this machine the G4VIS_BUILD_OPENGLX_DRIVER=\$G4VIS_BUILD_OPENGLX_DRIVER"
240fi 
241
242#+
243if [ X$g4vis_build_openglxm_driver = Xy ] ; then
244G4VIS_BUILD_OPENGLXM_DRIVER=1
245export G4VIS_BUILD_OPENGLXM_DRIVER
246echo "On this machine the G4VIS_BUILD_OPENGLXM_DRIVER=\$G4VIS_BUILD_OPENGLXM_DRIVER"
247fi 
248
249#+
250if [ X$g4vis_build_openglwin32_driver = Xy ] ; then
251G4VIS_BUILD_OPENGLWIN32_DRIVER=1
252export G4VIS_BUILD_OPENGLWIN32_DRIVER
253echo "On this machine the G4VIS_BUILD_OPENGLWIN32_DRIVER=\$G4VIS_BUILD_OPENGLWIN32_DRIVER"
254fi 
255
256#+
257if [ X$g4vis_build_oix_driver = Xy ] ; then
258G4VIS_BUILD_OIX_DRIVER=1
259export G4VIS_BUILD_OIX_DRIVER
260echo "On this machine the G4VIS_BUILD_OIX_DRIVER=\$G4VIS_BUILD_OIX_DRIVER"
261fi 
262
263#+
264if [ X$g4vis_build_oiwin32_driver = Xy ] ; then
265G4VIS_BUILD_OIWIN32_DRIVER=1
266export G4VIS_BUILD_OIWIN32_DRIVER
267echo "On this machine the G4VIS_BUILD_OIWIN32_DRIVER=\$G4VIS_BUILD_OIWIN32_DRIVER"
268fi 
269
270#+
271if [ X$g4vis_build_vrml_driver = Xy ] ; then
272G4VIS_BUILD_VRML_DRIVER=1
273export G4VIS_BUILD_VRML_DRIVER
274echo "On this machine the G4VIS_BUILD_VRML_DRIVER=\$G4VIS_BUILD_VRML_DRIVER"
275fi 
276
277#+
278if [ X$g4vis_build_openglqt_driver = Xy ] ; then
279G4VIS_BUILD_OPENGLQT_DRIVER=1
280export G4VIS_BUILD_OPENGLQT_DRIVER
281echo "On this machine the G4VIS_BUILD_OPENGLQT_DRIVER=\$G4VIS_BUILD_OPENGLQT_DRIVER"
282fi 
283
284
285
286#+
287if [ X$g4vis_use_dawn = Xy ] ; then
288G4VIS_USE_DAWN=1
289export G4VIS_USE_DAWN
290echo "On this machine the G4VIS_USE_DAWN=\$G4VIS_USE_DAWN"
291fi 
292
293#+
294if [ X$g4vis_use_openglx = Xy ] ; then
295G4VIS_USE_OPENGLX=1
296export G4VIS_USE_OPENGLX
297echo "On this machine the G4VIS_USE_OPENGLX=\$G4VIS_USE_OPENGLX"
298fi 
299
300#+
301if [ X$g4vis_use_openglxm = Xy ] ; then
302G4VIS_USE_OPENGLXM=1
303export G4VIS_USE_OPENGLXM
304echo "On this machine the G4VIS_USE_OPENGLXM=\$G4VIS_USE_OPENGLXM"
305fi 
306
307#+
308if [ X$g4vis_use_openglwin32 = Xy ] ; then
309G4VIS_USE_OPENGLWIN32=1
310export G4VIS_USE_OPENGLWIN32
311echo "On this machine the G4VIS_USE_OPENGLWIN32=\$G4VIS_USE_OPENGLWIN32"
312fi 
313
314#+
315if [ X$g4vis_use_oix = Xy ] ; then
316G4VIS_USE_OIX=1
317export G4VIS_USE_OIX
318echo "On this machine the G4VIS_USE_OIX=\$G4VIS_USE_OIX"
319fi 
320
321#+
322if [ X$g4vis_use_oiwin32 = Xy ] ; then
323G4VIS_USE_OIWIN32=1
324export G4VIS_USE_OIWIN32
325echo "On this machine the G4VIS_USE_OIWIN32=\$G4VIS_USE_OIWIN32"
326fi 
327
328#+
329if [ X$g4vis_use_vrml = Xy ] ; then
330G4VIS_USE_VRML=1
331export G4VIS_USE_VRML
332echo "On this machine the G4VIS_USE_VRML=\$G4VIS_USE_VRML"
333fi 
334
335#+
336if [ X$g4vis_use_openglqt = Xy ] ; then
337G4VIS_USE_OPENGLQT=1
338export G4VIS_USE_OPENGLQT
339echo "On this machine the G4VIS_USE_OPENGLQT=\$G4VIS_USE_OPENGLQT"
340fi 
341
342
343
344#+
345if [ X$g4vis_oglhome != X ] ; then
346OGLHOME="$g4vis_oglhome"
347export OGLHOME
348echo "On this machine the OGLHOME=\$OGLHOME"
349fi 
350
351#+
352if [ X$g4_qthome != X ] ; then
353QTHOME=$g4_qthome
354export QTHOME
355echo "On this machine the QTHOME=\$QTHOME"
356fi 
357
358
359
360#
361# Use GDML module
362#
363#+
364if [ X$g4lib_build_gdml = Xy ] ; then
365G4LIB_BUILD_GDML=1
366export G4LIB_BUILD_GDML
367echo "On this machine the G4LIB_BUILD_GDML=\$G4LIB_BUILD_GDML"
368fi 
369
370if [ X$g4lib_build_gdml = Xy ] ; then
371XERCESCROOT=$g4gdml_xercesc_root
372export XERCESCROOT
373echo "On this machine the XERCESCROOT=\$XERCESCROOT"
374fi 
375
376
377
378#
379# Use G3TOG4 module
380#
381#+
382if [ X$g4wlib_build_g3tog4 = Xy ] ; then
383G4LIB_BUILD_G3TOG4=1
384export G4LIB_BUILD_G3TOG4
385echo "On this machine the G4LIB_BUILD_G3TOG4=\$G4LIB_BUILD_G3TOG4"
386fi 
387
388if [ X$g4w_use_g3tog4 = Xy ] ; then
389G4LIB_USE_G3TOG4=1
390export G4LIB_USE_G3TOG4
391echo "On this machine the G4LIB_USE_G3TOG4=\$G4LIB_USE_G3TOG4"
392fi 
393
394#
395# Use ZLIB module
396#
397#+
398if [ X$g4wlib_build_zlib = Xy ] ; then
399G4LIB_BUILD_ZLIB=1
400export G4LIB_BUILD_ZLIB
401echo "On this machine the G4LIB_BUILD_ZLIB=\$G4LIB_BUILD_ZLIB"
402fi 
403
404if [ X$g4w_use_zlib = Xy ] ; then
405G4LIB_USE_ZLIB=1
406export G4LIB_USE_ZLIB
407echo "On this machine the G4LIB_USE_ZLIB=\$G4LIB_USE_ZLIB"
408fi 
409
410
411#+
412#
413# g4shared
414#
415if [ X$g4lib_build_shared = Xy ] ; then
416G4LIB_BUILD_SHARED=1
417export G4LIB_BUILD_SHARED
418echo "On this machine the G4LIB_BUILD_SHARED=\$G4LIB_BUILD_SHARED"
419fi 
420
421if [ X$g4lib_build_static = Xy ] ; then
422G4LIB_BUILD_STATIC=1
423export G4LIB_BUILD_STATIC
424echo "On this machine the G4LIB_BUILD_STATIC=\$G4LIB_BUILD_STATIC"
425fi 
426
427#+
428#
429# g4granular
430#
431if [ X$g4lib_use_granular = Xy ] ; then
432G4LIB_USE_GRANULAR=1
433export G4LIB_USE_GRANULAR
434echo "On this machine the G4LIB_USE_GRANULAR=\$G4LIB_USE_GRANULAR"
435fi 
436
437#####################################################################
438
439#####################################################################
440
441echo ""
442echo "Starting installation..."
443echo ""
444
445cd $g4install
446#echo `pwd`
447
448
449# Remove 'verbosity' in 'tar' command
450# If not INCLUDE then install full tree in 'src' directory!
451#
452if [ X$g4includes_flag = Xn ] ; then
453if [ X$g4install != X$g4final_install ] ; then
454echo ""
455echo "Installing sources and headers..."
456echo ""
457mkdir -p $g4final_install/src/geant4/
458tar cf - Configure config/ source/ environments/ examples/ include/ |(cd $g4final_install/src/geant4/; tar xf -)
459fi
460fi
461
462########################################
463# There is no env!
464if [ X$g4includes_flag = Xy ] ; then
465
466if [ X$g4install != X$g4final_install ] ; then
467echo ""
468echo "Installing sources..."
469echo ""
470
471mkdir -p $g4final_install/src/geant4/
472tar cf - Configure config/ source/ environments/ examples/ |(cd $g4final_install/src/geant4/; tar xf -)
473fi
474
475echo ""
476echo "Installing headers..."
477echo ""
478cd $g4install/source
479$g4make includes dependencies=""
480fi
481
482# Move libraries
483if [ X$g4install != X$g4final_install ] ; then
484echo ""
485echo "Installing libraries..."
486echo ""
487mkdir -p $g4final_install/lib/geant4
488cd $g4install/lib
489tar cf - $g4system |(cd $g4final_install/lib/geant4; tar xf -)
490fi
491
492# For the reason of strange behaivior for DOTted directory...
493mkdir -p $g4final_install/src/geant4/.config
494cd $g4install/.config
495tar cf - . |(cd $g4final_install/src/geant4/.config; tar xf -)
496
497
498!GROK!THIS!
499
500: In the following dollars and backticks do not need the extra backslash.
501$spitshell >>move.sh <<'!NO!SUBS!'
502!NO!SUBS!
503chmod 755 move.sh
504$eunicefix move.sh
505
Note: See TracBrowser for help on using the repository browser.