source: trunk/config/scripts/install.sh.SH @ 1195

Last change on this file since 1195 was 1195, checked in by garnier, 15 years ago

update CVS release candidate geant4.9.3.01

  • Property svn:executable set to *
File size: 16.2 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 install.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 >install.sh <<!GROK!THIS!
25######################################
26#
27# Clean all G4 envs
28unset  CLHEP_BASE_DIR
29unset  CLHEP_INCLUDE_DIR
30unset  CLHEP_LIB
31unset  CLHEP_LIB_DIR
32
33unset  G4ANALYSIS_USE
34unset  G4DEBUG
35unset  G4INCLUDE
36unset  G4INSTALL
37
38unset  G4LEDATA
39unset  G4LEVELGAMMADATA
40unset  G4NEUTRONHPDATA
41unset  G4RADIOACTIVEDATA
42unset  G4ABLADATA
43
44unset  G4LIB
45unset  G4LIB_BUILD_G3TOG4
46unset  G4LIB_BUILD_SHARED
47unset  G4LIB_BUILD_STATIC
48unset  G4LIB_BUILD_ZLIB
49unset  G4LIB_BUILD_GDML
50unset  G4LIB_USE_G3TOG4
51unset  G4LIB_USE_GRANULAR
52unset  G4LIB_USE_ZLIB
53
54unset  G4SYSTEM
55
56unset  G4UI_NONE
57unset  G4UI_BUILD_WIN32_SESSION
58unset  G4UI_BUILD_XAW_SESSION
59unset  G4UI_BUILD_XM_SESSION
60unset  G4UI_BUILD_QT_SESSION
61unset  G4UI_USE_TCSH
62unset  G4UI_USE_WIN32
63unset  G4UI_USE_XAW
64unset  G4UI_USE_XM
65unset  G4UI_USE_QT
66
67unset  G4VIS_NONE
68unset  G4VIS_BUILD_DAWN_DRIVER
69unset  G4VIS_BUILD_OIWIN32_DRIVER
70unset  G4VIS_BUILD_OIX_DRIVER
71unset  G4VIS_BUILD_OPENGLWIN32_DRIVER
72unset  G4VIS_BUILD_OPENGLXM_DRIVER
73unset  G4VIS_BUILD_OPENGLX_DRIVER
74unset  G4VIS_BUILD_RAYTRACERX_DRIVER
75unset  G4VIS_BUILD_VRML_DRIVER
76unset  G4VIS_BUILD_OPENGLQT_DRIVER
77
78unset  G4VIS_USE_DAWN
79unset  G4VIS_USE_OIWIN32
80unset  G4VIS_USE_OIX
81unset  G4VIS_USE_OPENGLWIN32
82unset  G4VIS_USE_OPENGLX
83unset  G4VIS_USE_OPENGLXM
84unset  G4VIS_USE_RAYTRACERX
85unset  G4VIS_USE_VRML
86unset  G4VIS_USE_OPENGLQT
87
88######################################
89#
90# g4system.U
91#
92#+
93G4SYSTEM="$g4system"
94export G4SYSTEM
95echo "On this machine the G4SYSTEM=\$G4SYSTEM"
96
97#
98# g4dirs.U
99#
100#+
101G4INSTALL="$g4install"
102export G4INSTALL
103echo "On this machine the G4INSTALL=\$G4INSTALL"
104
105#+
106if [ X$g4include != X -a X$g4include != Xn ] ; then
107G4INCLUDE="$g4include"
108export G4INCLUDE
109echo "On this machine the G4INCLUDE=\$G4INCLUDE"
110fi
111
112#+
113if [ X$g4tmp != X ] ; then
114G4TMP="$g4tmp"
115export G4TMP
116echo "On this machine the G4TMP=\$G4TMP"
117fi
118
119#+
120if [ X$g4lib != X ] ; then 
121G4LIB="$g4lib"
122export G4LIB
123echo "On this machine the G4LIB=\$G4LIB"
124fi
125
126#+
127if [ X$g4lib != X ] ; then 
128G4BIN="$g4lib/../bin"
129export G4BIN
130fi
131
132#+
133if [ X$g4levelgammadata != X ] ; then 
134G4LEVELGAMMADATA="$g4levelgammadata"
135export G4LEVELGAMMADATA
136echo "On this machine the G4LEVELGAMMADATA=\$G4LEVELGAMMADATA"
137fi
138
139#+
140if [ X$g4radioactivedata != X ] ; then 
141G4RADIOACTIVEDATA="$g4radioactivedata"
142export G4RADIOACTIVEDATA
143echo "On this machine the G4RADIOACTIVEDATA=\$G4RADIOACTIVEDATA"
144fi
145
146#+
147if [ X$g4ledata != X ] ; then 
148G4LEDATA="$g4ledata"
149export G4LEDATA
150echo "On this machine the G4LEDATA=\$G4LEDATA"
151fi
152
153#+
154if [ X$g4neutronhpcrosssections != X ] ; then 
155G4NEUTRONHPDATA="$g4neutronhpcrosssections"
156export G4NEUTRONHPDATA
157echo "On this machine the G4NEUTRONHPDATA=\$G4NEUTRONHPDATA"
158fi
159
160#+
161if [ X$g4abladata != X ] ; then 
162G4ABLADATA="$g4abladata"
163export G4ABLADATA
164echo "On this machine the G4ABLADATA=\$G4ABLADATA"
165fi
166
167
168
169
170#+
171#if [ X$g4elasticdata != X ] ; then
172#G4ELASTICDATA="$g4elasticdata"
173#export G4ELASTICDATA
174#echo "On this machine the G4ELASTICDATA=\$g4elasticdata"
175#fi
176
177#
178# g4clhep.U
179#
180if [ X$g4clhep_base_dir != X ] ; then 
181CLHEP_BASE_DIR="$g4clhep_base_dir"
182export CLHEP_BASE_DIR
183echo "On this machine the CLHEP_BASE_DIR=\$CLHEP_BASE_DIR"
184fi
185
186#if [ X$g4clhep_base_dir != X/usr -o X$g4clhep_base_dir != X/usr/local ] ; then
187#CLHEP_BASE_DIR="$g4clhep_base_dir"
188#export CLHEP_BASE_DIR
189#echo "On this machine the CLHEP_BASE_DIR=\$CLHEP_BASE_DIR"
190#fi
191
192#+
193if [ X$g4clhep_include_dir != X ] ; then 
194CLHEP_INCLUDE_DIR="$g4clhep_include_dir"
195export CLHEP_INCLUDE_DIR
196echo "On this machine the CLHEP_INCLUDE_DIR=\$CLHEP_INCLUDE_DIR"
197fi
198
199#+
200if [ X$g4clhep_lib_dir != X ] ; then 
201CLHEP_LIB_DIR="$g4clhep_lib_dir"
202export CLHEP_LIB_DIR
203echo "On this machine the CLHEP_LIB_DIR=\$CLHEP_LIB_DIR"
204fi
205
206#+
207if [ X$g4clhep_lib != X ] ; then 
208CLHEP_LIB="$g4clhep_lib"
209export CLHEP_LIB
210echo "On this machine the CLHEP_LIB=\$CLHEP_LIB"
211fi
212
213#+
214#
215# g4debug
216#
217if [ X$g4debug = Xy ] ; then 
218G4DEBUG=1
219export G4DEBUG
220echo "On this machine the G4DEBUG=\$G4DEBUG"
221fi
222
223#
224# g4analysis
225#
226#+
227if [ X$g4wanalysis_use = Xy ] ; then
228G4ANALYSIS_USE=1
229export G4ANALYSIS_USE
230echo "On this machine the G4ANALYSIS_USE=\$G4ANALYSIS_USE"
231fi 
232
233#
234# g4ui
235#
236#+
237if [ X$g4ui_none = Xy ] ; then
238G4UI_NONE=1
239export G4UI_NONE
240echo "On this machine G4UI_NONE is set - no UIs will be built"
241
242else
243echo "On this machine G4UI_NONE is not set - following UIs will be built:"
244
245#+
246if [ X$g4ui_build_xaw_session = Xy ] ; then
247G4UI_BUILD_XAW_SESSION=1
248export G4UI_BUILD_XAW_SESSION
249echo "On this machine the G4UI_BUILD_XAW_SESSION=\$G4UI_BUILD_XAW_SESSION"
250fi 
251
252#+
253if [ X$g4ui_use_xaw = Xy ] ; then
254G4UI_USE_XAW=1
255export G4UI_USE_XAW
256echo "On this machine the G4UI_USE_XAW=\$G4UI_USE_XAW"
257fi 
258
259#+
260if [ X$g4ui_build_xm_session = Xy ] ; then
261G4UI_BUILD_XM_SESSION=1
262export G4UI_BUILD_XM_SESSION
263echo "On this machine the G4UI_BUILD_XM_SESSION=\$G4UI_BUILD_XM_SESSION"
264fi 
265
266#+
267if [ X$g4ui_use_xm = Xy ] ; then
268G4UI_USE_XM=1
269export G4UI_USE_XM
270echo "On this machine the G4UI_USE_XM=\$G4UI_USE_XM"
271fi 
272
273#+
274if [ X$g4ui_build_win32_session = Xy ] ; then
275G4UI_BUILD_WIN32_SESSION=1
276export G4UI_BUILD_WIN32_SESSION
277echo "On this machine the G4UI_BUILD_WIN32_SESSION=\$G4UI_BUILD_WIN32_SESSION"
278fi 
279
280#+
281if [ X$g4ui_use_win32 = Xy ] ; then
282G4UI_USE_WIN32=1
283export G4UI_USE_WIN32
284echo "On this machine the G4UI_USE_WIN32=\$G4UI_USE_WIN32"
285fi 
286
287
288#+
289if [ X$g4ui_build_qt_session = Xy ] ; then
290G4UI_BUILD_QT_SESSION=1
291export G4UI_BUILD_QT_SESSION
292echo "On this machine the G4UI_BUILD_QT_SESSION=\$G4UI_BUILD_QT_SESSION"
293fi
294
295#+
296if [ X$g4ui_use_qt = Xy ] ; then
297G4UI_USE_QT=1
298export G4UI_USE_QT
299echo "On this machine the G4UI_USE_QT=\$G4UI_USE_QT"
300fi 
301
302fi
303# END OF G4UI_NONE block
304
305#
306# g4vis
307#
308#+
309if [ X$g4vis_none = Xy ] ; then
310G4VIS_NONE=1
311export G4VIS_NONE
312echo "On this machine G4VIS_NONE is set - no drivers will be built"
313
314else
315echo "On this machine G4VIS_NONE is not set - following drivers will be built:"
316
317#+
318if [ X$g4vis_build_dawn_driver = Xy ] ; then
319G4VIS_BUILD_DAWN_DRIVER=1
320export G4VIS_BUILD_DAWN_DRIVER
321echo "On this machine the G4VIS_BUILD_DAWN_DRIVER=\$G4VIS_BUILD_DAWN_DRIVER"
322fi 
323
324#+
325if [ X$g4vis_build_openglx_driver = Xy ] ; then
326G4VIS_BUILD_OPENGLX_DRIVER=1
327export G4VIS_BUILD_OPENGLX_DRIVER
328echo "On this machine the G4VIS_BUILD_OPENGLX_DRIVER=\$G4VIS_BUILD_OPENGLX_DRIVER"
329fi 
330
331#+
332if [ X$g4vis_build_openglxm_driver = Xy ] ; then
333G4VIS_BUILD_OPENGLXM_DRIVER=1
334export G4VIS_BUILD_OPENGLXM_DRIVER
335echo "On this machine the G4VIS_BUILD_OPENGLXM_DRIVER=\$G4VIS_BUILD_OPENGLXM_DRIVER"
336fi 
337
338#+
339if [ X$g4vis_build_openglwin32_driver = Xy ] ; then
340G4VIS_BUILD_OPENGLWIN32_DRIVER=1
341export G4VIS_BUILD_OPENGLWIN32_DRIVER
342echo "On this machine the G4VIS_BUILD_OPENGLWIN32_DRIVER=\$G4VIS_BUILD_OPENGLWIN32_DRIVER"
343fi 
344
345#+
346if [ X$g4vis_build_oix_driver = Xy ] ; then
347G4VIS_BUILD_OIX_DRIVER=1
348export G4VIS_BUILD_OIX_DRIVER
349echo "On this machine the G4VIS_BUILD_OIX_DRIVER=\$G4VIS_BUILD_OIX_DRIVER"
350fi 
351
352#+
353if [ X$g4vis_build_raytracerx_driver = Xy ] ; then
354G4VIS_BUILD_RAYTRACERX_DRIVER=1
355export G4VIS_BUILD_RAYTRACERX_DRIVER
356echo "On this machine the G4VIS_BUILD_RAYTRACERX_DRIVER=\$G4VIS_BUILD_RAYTRACERX_DRIVER"
357fi 
358
359#+
360if [ X$g4vis_build_oiwin32_driver = Xy ] ; then
361G4VIS_BUILD_OIWIN32_DRIVER=1
362export G4VIS_BUILD_OIWIN32_DRIVER
363echo "On this machine the G4VIS_BUILD_OIWIN32_DRIVER=\$G4VIS_BUILD_OIWIN32_DRIVER"
364fi 
365
366#+
367if [ X$g4vis_build_vrml_driver = Xy ] ; then
368G4VIS_BUILD_VRML_DRIVER=1
369export G4VIS_BUILD_VRML_DRIVER
370echo "On this machine the G4VIS_BUILD_VRML_DRIVER=\$G4VIS_BUILD_VRML_DRIVER"
371fi 
372
373#+
374if [ X$g4vis_build_openglqt_driver = Xy ] ; then
375G4VIS_BUILD_OPENGLQT_DRIVER=1
376export G4VIS_BUILD_OPENGLQT_DRIVER
377echo "On this machine the G4VIS_BUILD_OPENGLQT_DRIVER=\$G4VIS_BUILD_OPENGLQT_DRIVER"
378fi
379
380
381#+
382if [ X$g4vis_use_dawn = Xy ] ; then
383G4VIS_USE_DAWN=1
384export G4VIS_USE_DAWN
385echo "On this machine the G4VIS_USE_DAWN=\$G4VIS_USE_DAWN"
386fi 
387
388#+
389if [ X$g4vis_use_openglx = Xy ] ; then
390G4VIS_USE_OPENGLX=1
391export G4VIS_USE_OPENGLX
392echo "On this machine the G4VIS_USE_OPENGLX=\$G4VIS_USE_OPENGLX"
393fi 
394
395#+
396if [ X$g4vis_use_openglxm = Xy ] ; then
397G4VIS_USE_OPENGLXM=1
398export G4VIS_USE_OPENGLXM
399echo "On this machine the G4VIS_USE_OPENGLXM=\$G4VIS_USE_OPENGLXM"
400fi 
401
402#+
403if [ X$g4vis_use_openglwin32 = Xy ] ; then
404G4VIS_USE_OPENGLWIN32=1
405export G4VIS_USE_OPENGLWIN32
406echo "On this machine the G4VIS_USE_OPENGLWIN32=\$G4VIS_USE_OPENGLWIN32"
407fi 
408
409#+
410if [ X$g4vis_use_oix = Xy ] ; then
411G4VIS_USE_OIX=1
412export G4VIS_USE_OIX
413echo "On this machine the G4VIS_USE_OIX=\$G4VIS_USE_OIX"
414fi 
415
416#+
417if [ X$g4vis_use_raytracerx = Xy ] ; then
418G4VIS_USE_RAYTRACERX=1
419export G4VIS_USE_RAYTRACERX
420echo "On this machine the G4VIS_USE_RAYTRACERX=\$G4VIS_USE_RAYTRACERX"
421fi 
422
423#+
424if [ X$g4vis_use_oiwin32 = Xy ] ; then
425G4VIS_USE_OIWIN32=1
426export G4VIS_USE_OIWIN32
427echo "On this machine the G4VIS_USE_OIWIN32=\$G4VIS_USE_OIWIN32"
428fi 
429
430#+
431if [ X$g4vis_use_vrml = Xy ] ; then
432G4VIS_USE_VRML=1
433export G4VIS_USE_VRML
434echo "On this machine the G4VIS_USE_VRML=\$G4VIS_USE_VRML"
435fi 
436
437
438#+
439if [ X$g4vis_use_openglqt = Xy ] ; then
440G4VIS_USE_OPENGLQT=1
441export G4VIS_USE_OPENGLQT
442echo "On this machine the G4VIS_USE_OPENGLQT=\$G4VIS_USE_OPENGLQT"
443fi 
444
445
446fi
447# End of G4VIS_NONE block
448
449
450
451#+
452if [ X$g4vis_oglhome != X ] ; then
453OGLHOME="$g4vis_oglhome"
454export OGLHOME
455echo "On this machine the OGLHOME=\$OGLHOME"
456fi 
457
458#+
459if [ X$g4vis_oivhome != X ] ; then
460OIVHOME="$g4vis_oivhome"
461export OIVHOME
462if [ X\$g4non_display = X ] ; then
463echo "On this machine the OIVHOME=\$OIVHOME"
464fi
465fi 
466
467
468#+
469if [ X$g4vis_build_openglxm_driver != X ] ; then
470XMFLAGS="$g4vis_xmflags"
471export XMFLAGS
472if [ X\$g4non_display = X ] ; then
473echo "On this machine the XMFLAGS=\$XMFLAGS"
474fi
475fi 
476
477#+
478if [ X$g4vis_build_openglxm_driver != X ] ; then
479XMLIBS="$g4vis_xmlibs"
480export XMLIBS
481if [ X\$g4non_display = X ] ; then
482echo "On this machine the XMLIBS=\$XMLIBS"
483fi
484fi 
485
486#+
487if [ X$g4ui_build_xm_session != X ] ; then
488XMFLAGS="$g4vis_xmflags"
489export XMFLAGS
490if [ X\$g4non_display = X ] ; then
491echo "On this machine the XMFLAGS=\$XMFLAGS"
492fi
493fi 
494
495#+
496if [ X$g4vis_build_xm_session != X ] ; then
497XMLIBS="$g4vis_xmlibs"
498export XMLIBS
499if [ X\$g4non_display = X ] ; then
500echo "On this machine the XMLIBS=\$XMLIBS"
501fi
502fi 
503
504#+
505if [ X$g4ui_build_xaw_session != X ] ; then
506XAWFLAGS="$g4ui_xawflags"
507export XAWFLAGS
508if [ X\$g4non_display = X ] ; then
509echo "On this machine the XAWFLAGS=\$XAWFLAGS"
510fi
511fi 
512
513#+
514if [ X$g4ui_build_xaw_session != X ] ; then
515XAWLIBS="$g4ui_xawlibs"
516export XAWLIBS
517if [ X\$g4non_display = X ] ; then
518echo "On this machine the XAWLIBS=\$XAWLIBS"
519fi
520fi 
521
522
523
524# Qt Flags and Libs, messy, but needed for backward compatibility
525#+
526if [ "X$g4ui_build_qt_session" = "Xy" -o "X$g4ui_use_qt" = "Xy" ] ; then
527QTFLAGS="$g4_qt_cxxflags"
528QTLIBS="$g4_qt_libs"
529QTMOC="$g4_qt_moc"
530export QTFLAGS
531export QTLIBS
532export QTMOC
533if [ X\$g4non_display = X ] ; then
534echo "On this machine the QTFLAGS=\$QTFLAGS"
535echo "On this machine the QTLIBS=\$QTLIBS"
536echo "On this machine the QTMOC=\$QTMOC"
537fi
538fi
539
540if [ "X$g4vis_build_openglqt_driver" = "Xy" -o "X$g4vis_build_openglqt_driver" = "Xy" ] ; then
541if [ "X\$QTFLAGS" = "X" ] ; then
542QTFLAGS="$g4_qt_cxxflags $g4_qt_gl_cxxflags"
543else
544QTFLAGS="\$QTFLAGS $g4_qt_gl_cxxflags"
545fi
546if [ "X\$QTMOC" = "X" ] ; then
547QTMOC="$g4_qt_moc"
548fi
549GLQTLIBS="$g4_qt_libs $g4_qt_gl_libs"
550export QTFLAGS
551export QTMOC
552export GLQTLIBS
553if [ X\$g4non_display = X ] ; then
554echo "On this machine the QTFLAGS=\$QTFLAGS"
555echo "On this machine the GLQTLIBS=\$GLQTLIBS"
556echo "On this machine the QTMOC=\$QTMOC"
557fi
558fi
559
560
561#
562# Use GDML module
563#
564#+
565if [ X$g4lib_build_gdml = Xy ] ; then
566G4LIB_BUILD_GDML=1
567export G4LIB_BUILD_GDML
568echo "On this machine the G4LIB_BUILD_GDML=\$G4LIB_BUILD_GDML"
569fi 
570
571if [ X$g4lib_build_gdml = Xy ] ; then
572XERCESCROOT=$g4gdml_xercesc_root
573export XERCESCROOT
574echo "On this machine the XERCESCROOT=\$XERCESCROOT"
575fi 
576
577
578#
579# Use G3TOG4 module
580#
581#+
582if [ X$g4wlib_build_g3tog4 = Xy ] ; then
583G4LIB_BUILD_G3TOG4=1
584export G4LIB_BUILD_G3TOG4
585echo "On this machine the G4LIB_BUILD_G3TOG4=\$G4LIB_BUILD_G3TOG4"
586fi 
587
588if [ X$g4w_use_g3tog4 = Xy ] ; then
589G4LIB_USE_G3TOG4=1
590export G4LIB_USE_G3TOG4
591echo "On this machine the G4LIB_USE_G3TOG4=\$G4LIB_USE_G3TOG4"
592fi 
593
594#
595# Use ZLIB module
596#
597#+
598if [ X$g4wlib_build_zlib = Xy ] ; then
599G4LIB_BUILD_ZLIB=1
600export G4LIB_BUILD_ZLIB
601echo "On this machine the G4LIB_BUILD_ZLIB=\$G4LIB_BUILD_ZLIB"
602fi 
603
604if [ X$g4w_use_zlib = Xy ] ; then
605G4LIB_USE_ZLIB=1
606export G4LIB_USE_ZLIB
607echo "On this machine the G4LIB_USE_ZLIB=\$G4LIB_USE_ZLIB"
608fi 
609
610#+
611#
612# g4shared
613#
614if [ X$g4lib_build_shared = Xy ] ; then
615G4LIB_BUILD_SHARED=1
616export G4LIB_BUILD_SHARED
617echo "On this machine the G4LIB_BUILD_SHARED=\$G4LIB_BUILD_SHARED"
618fi 
619
620if [ X$g4lib_build_static = Xy ] ; then
621G4LIB_BUILD_STATIC=1
622export G4LIB_BUILD_STATIC
623echo "On this machine the G4LIB_BUILD_STATIC=\$G4LIB_BUILD_STATIC"
624fi 
625
626#+
627#
628# g4granular
629#
630if [ X$g4lib_use_granular = Xy ] ; then
631G4LIB_USE_GRANULAR=1
632export G4LIB_USE_GRANULAR
633echo "On this machine the G4LIB_USE_GRANULAR=\$G4LIB_USE_GRANULAR"
634fi 
635
636#####################################################################
637
638#####################################################################
639# Create GNUmakefile.db to keep ALL GNUmakefile DB :)
640
641if test -f \$G4INSTALL/config/scripts/GNUmakefile.db ; then
642mv \$G4INSTALL/config/scripts/GNUmakefile.db \$G4LIB/\$G4SYSTEM/GNUmakefile.db.bac
643fi
644
645# Be careful: first time there is no $G4LIB!
646
647mkdir -p \$G4LIB/\$G4SYSTEM
648
649$g4make -n -p -f \$G4INSTALL/config/scripts/GNUmakefile > \$G4LIB/\$G4SYSTEM/GNUmakefile.db
650
651echo ""
652echo "Starting build..."
653echo ""
654cd $g4install/source
655#echo `pwd`
656
657# There is no env!
658if [ X$g4global = Xy ] ; then
659echo ""
660rm -rf $g4conf/g4make.log
661$g4make global 2>&1 | tee $g4conf/g4make.log
662fi
663
664# There is env for binaries - for User: should be set in env.[c]sh!
665if [ X$g4granular = Xy ] ; then
666G4LIB_USE_GRANULAR=1
667export G4LIB_USE_GRANULAR
668rm -rf $g4conf/g4make.log
669$g4make 2>&1 | tee $g4conf/g4make.log
670fi
671
672if [ X$g4lib_build_dll = Xy ] ; then
673echo ""
674rm -rf $g4conf/g4make.log
675$g4make dll 2>&1 | tee $g4conf/g4make.log
676fi
677
678if [ X$g4lib_build_dyn = Xy ] ; then
679echo ""
680rm -rf $g4conf/g4make.log
681$g4make global G4LIB_BUILD_SHARED=1 2>&1 | tee $g4conf/g4make.log
682fi
683
684# Check for errors in log file
685if test -f \$g4conf/g4make.log ; then
686
687# There are two (at least) shells 'sh' and 'bash' with
688# different arithmetic expansion...So we are doing it by 'text'
689# in two steps...
690 
691err=\`grep " Error " $g4conf/g4make.log | wc -w\` 
692int=\`grep " Interrupt " $g4conf/g4make.log | wc -w\` 
693stp=\`grep Stop\. $g4conf/g4make.log | wc -w\` 
694
695err2=\`echo \$err\`
696int2=\`echo \$int\`
697stp2=\`echo \$stp\`
698
699if [ X\$err2 = X0 -a X\$int2 = X0 ] ; then
700echo ""
701echo "####################################################"
702echo "# Your Geant4 installation seems to be successful!  "
703echo "# To be sure please have a look into the log file:  "
704echo "# $g4conf/g4make.log                                "
705echo "####################################################"
706echo ""
707else
708echo ""
709echo "############################################################"
710echo "# It looks like you had errors during Geant4 installation   "
711echo "# (or interrupted installation)!                            "
712echo "# Please check log file:                                    "
713echo "# $g4conf/g4make.log                                        "
714echo "############################################################"
715echo ""
716fi 
717else
718echo ""
719echo "############################################################"
720echo "# It looks like you had errors during Geant4 installation   "
721echo "# (or interrupted installation)!                            "
722echo "# You have no log file:                                     "
723echo "# $g4conf/g4make.log                                        "
724echo "############################################################"
725echo ""
726fi
727
728!GROK!THIS!
729
730: In the following dollars and backticks do not need the extra backslash.
731$spitshell >>install.sh <<'!NO!SUBS!'
732!NO!SUBS!
733chmod 755 install.sh
734$eunicefix install.sh
735
Note: See TracBrowser for help on using the repository browser.