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

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

change and better Leopard check on Mac OSX

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