source: trunk/config/scripts/install.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

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