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