source: trunk/config/scripts/move.sh.SH @ 1337

Last change on this file since 1337 was 1337, checked in by garnier, 14 years ago

tag geant4.9.4 beta 1 + modifs locales

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