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_NONE |
---|
57 | unset G4UI_BUILD_WIN32_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_XM |
---|
63 | unset G4UI_USE_QT |
---|
64 | |
---|
65 | unset G4VIS_NONE |
---|
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_none = Xy ] ; then |
---|
236 | G4UI_NONE=1 |
---|
237 | export G4UI_NONE |
---|
238 | echo "On this machine G4UI_NONE is set - no UIs will be built" |
---|
239 | |
---|
240 | else |
---|
241 | echo "On this machine G4UI_NONE is not set - following UIs will be built:" |
---|
242 | |
---|
243 | #+ |
---|
244 | if [ X$g4ui_build_xm_session = Xy ] ; then |
---|
245 | G4UI_BUILD_XM_SESSION=1 |
---|
246 | export G4UI_BUILD_XM_SESSION |
---|
247 | echo "On this machine the G4UI_BUILD_XM_SESSION=\$G4UI_BUILD_XM_SESSION" |
---|
248 | fi |
---|
249 | |
---|
250 | #+ |
---|
251 | if [ X$g4ui_use_xm = Xy ] ; then |
---|
252 | G4UI_USE_XM=1 |
---|
253 | export G4UI_USE_XM |
---|
254 | echo "On this machine the G4UI_USE_XM=\$G4UI_USE_XM" |
---|
255 | fi |
---|
256 | |
---|
257 | #+ |
---|
258 | if [ X$g4ui_build_win32_session = Xy ] ; then |
---|
259 | G4UI_BUILD_WIN32_SESSION=1 |
---|
260 | export G4UI_BUILD_WIN32_SESSION |
---|
261 | echo "On this machine the G4UI_BUILD_WIN32_SESSION=\$G4UI_BUILD_WIN32_SESSION" |
---|
262 | fi |
---|
263 | |
---|
264 | #+ |
---|
265 | if [ X$g4ui_use_win32 = Xy ] ; then |
---|
266 | G4UI_USE_WIN32=1 |
---|
267 | export G4UI_USE_WIN32 |
---|
268 | echo "On this machine the G4UI_USE_WIN32=\$G4UI_USE_WIN32" |
---|
269 | fi |
---|
270 | |
---|
271 | |
---|
272 | #+ |
---|
273 | if [ X$g4ui_build_qt_session = Xy ] ; then |
---|
274 | G4UI_BUILD_QT_SESSION=1 |
---|
275 | export G4UI_BUILD_QT_SESSION |
---|
276 | echo "On this machine the G4UI_BUILD_QT_SESSION=\$G4UI_BUILD_QT_SESSION" |
---|
277 | fi |
---|
278 | |
---|
279 | #+ |
---|
280 | if [ X$g4ui_use_qt = Xy ] ; then |
---|
281 | G4UI_USE_QT=1 |
---|
282 | export G4UI_USE_QT |
---|
283 | echo "On this machine the G4UI_USE_QT=\$G4UI_USE_QT" |
---|
284 | fi |
---|
285 | |
---|
286 | fi |
---|
287 | # END OF G4UI_NONE block |
---|
288 | |
---|
289 | # |
---|
290 | # g4vis |
---|
291 | # |
---|
292 | #+ |
---|
293 | if [ X$g4vis_none = Xy ] ; then |
---|
294 | G4VIS_NONE=1 |
---|
295 | export G4VIS_NONE |
---|
296 | echo "On this machine G4VIS_NONE is set - no drivers will be built" |
---|
297 | |
---|
298 | else |
---|
299 | echo "On this machine G4VIS_NONE is not set - following drivers will be built:" |
---|
300 | |
---|
301 | #+ |
---|
302 | if [ X$g4vis_build_dawn_driver = Xy ] ; then |
---|
303 | G4VIS_BUILD_DAWN_DRIVER=1 |
---|
304 | export G4VIS_BUILD_DAWN_DRIVER |
---|
305 | echo "On this machine the G4VIS_BUILD_DAWN_DRIVER=\$G4VIS_BUILD_DAWN_DRIVER" |
---|
306 | fi |
---|
307 | |
---|
308 | #+ |
---|
309 | if [ X$g4vis_build_openglx_driver = Xy ] ; then |
---|
310 | G4VIS_BUILD_OPENGLX_DRIVER=1 |
---|
311 | export G4VIS_BUILD_OPENGLX_DRIVER |
---|
312 | echo "On this machine the G4VIS_BUILD_OPENGLX_DRIVER=\$G4VIS_BUILD_OPENGLX_DRIVER" |
---|
313 | fi |
---|
314 | |
---|
315 | #+ |
---|
316 | if [ X$g4vis_build_openglxm_driver = Xy ] ; then |
---|
317 | G4VIS_BUILD_OPENGLXM_DRIVER=1 |
---|
318 | export G4VIS_BUILD_OPENGLXM_DRIVER |
---|
319 | echo "On this machine the G4VIS_BUILD_OPENGLXM_DRIVER=\$G4VIS_BUILD_OPENGLXM_DRIVER" |
---|
320 | fi |
---|
321 | |
---|
322 | #+ |
---|
323 | if [ X$g4vis_build_openglwin32_driver = Xy ] ; then |
---|
324 | G4VIS_BUILD_OPENGLWIN32_DRIVER=1 |
---|
325 | export G4VIS_BUILD_OPENGLWIN32_DRIVER |
---|
326 | echo "On this machine the G4VIS_BUILD_OPENGLWIN32_DRIVER=\$G4VIS_BUILD_OPENGLWIN32_DRIVER" |
---|
327 | fi |
---|
328 | |
---|
329 | #+ |
---|
330 | if [ X$g4vis_build_oix_driver = Xy ] ; then |
---|
331 | G4VIS_BUILD_OIX_DRIVER=1 |
---|
332 | export G4VIS_BUILD_OIX_DRIVER |
---|
333 | echo "On this machine the G4VIS_BUILD_OIX_DRIVER=\$G4VIS_BUILD_OIX_DRIVER" |
---|
334 | fi |
---|
335 | |
---|
336 | #+ |
---|
337 | if [ X$g4vis_build_raytracerx_driver = Xy ] ; then |
---|
338 | G4VIS_BUILD_RAYTRACERX_DRIVER=1 |
---|
339 | export G4VIS_BUILD_RAYTRACERX_DRIVER |
---|
340 | echo "On this machine the G4VIS_BUILD_RAYTRACERX_DRIVER=\$G4VIS_BUILD_RAYTRACERX_DRIVER" |
---|
341 | fi |
---|
342 | |
---|
343 | #+ |
---|
344 | if [ X$g4vis_build_oiwin32_driver = Xy ] ; then |
---|
345 | G4VIS_BUILD_OIWIN32_DRIVER=1 |
---|
346 | export G4VIS_BUILD_OIWIN32_DRIVER |
---|
347 | echo "On this machine the G4VIS_BUILD_OIWIN32_DRIVER=\$G4VIS_BUILD_OIWIN32_DRIVER" |
---|
348 | fi |
---|
349 | |
---|
350 | #+ |
---|
351 | if [ X$g4vis_build_vrml_driver = Xy ] ; then |
---|
352 | G4VIS_BUILD_VRML_DRIVER=1 |
---|
353 | export G4VIS_BUILD_VRML_DRIVER |
---|
354 | echo "On this machine the G4VIS_BUILD_VRML_DRIVER=\$G4VIS_BUILD_VRML_DRIVER" |
---|
355 | fi |
---|
356 | |
---|
357 | #+ |
---|
358 | if [ X$g4vis_build_openglqt_driver = Xy ] ; then |
---|
359 | G4VIS_BUILD_OPENGLQT_DRIVER=1 |
---|
360 | export G4VIS_BUILD_OPENGLQT_DRIVER |
---|
361 | echo "On this machine the G4VIS_BUILD_OPENGLQT_DRIVER=\$G4VIS_BUILD_OPENGLQT_DRIVER" |
---|
362 | fi |
---|
363 | |
---|
364 | |
---|
365 | #+ |
---|
366 | if [ X$g4vis_use_dawn = Xy ] ; then |
---|
367 | G4VIS_USE_DAWN=1 |
---|
368 | export G4VIS_USE_DAWN |
---|
369 | echo "On this machine the G4VIS_USE_DAWN=\$G4VIS_USE_DAWN" |
---|
370 | fi |
---|
371 | |
---|
372 | #+ |
---|
373 | if [ X$g4vis_use_openglx = Xy ] ; then |
---|
374 | G4VIS_USE_OPENGLX=1 |
---|
375 | export G4VIS_USE_OPENGLX |
---|
376 | echo "On this machine the G4VIS_USE_OPENGLX=\$G4VIS_USE_OPENGLX" |
---|
377 | fi |
---|
378 | |
---|
379 | #+ |
---|
380 | if [ X$g4vis_use_openglxm = Xy ] ; then |
---|
381 | G4VIS_USE_OPENGLXM=1 |
---|
382 | export G4VIS_USE_OPENGLXM |
---|
383 | echo "On this machine the G4VIS_USE_OPENGLXM=\$G4VIS_USE_OPENGLXM" |
---|
384 | fi |
---|
385 | |
---|
386 | #+ |
---|
387 | if [ X$g4vis_use_openglwin32 = Xy ] ; then |
---|
388 | G4VIS_USE_OPENGLWIN32=1 |
---|
389 | export G4VIS_USE_OPENGLWIN32 |
---|
390 | echo "On this machine the G4VIS_USE_OPENGLWIN32=\$G4VIS_USE_OPENGLWIN32" |
---|
391 | fi |
---|
392 | |
---|
393 | #+ |
---|
394 | if [ X$g4vis_use_oix = Xy ] ; then |
---|
395 | G4VIS_USE_OIX=1 |
---|
396 | export G4VIS_USE_OIX |
---|
397 | echo "On this machine the G4VIS_USE_OIX=\$G4VIS_USE_OIX" |
---|
398 | fi |
---|
399 | |
---|
400 | #+ |
---|
401 | if [ X$g4vis_use_raytracerx = Xy ] ; then |
---|
402 | G4VIS_USE_RAYTRACERX=1 |
---|
403 | export G4VIS_USE_RAYTRACERX |
---|
404 | echo "On this machine the G4VIS_USE_RAYTRACERX=\$G4VIS_USE_RAYTRACERX" |
---|
405 | fi |
---|
406 | |
---|
407 | #+ |
---|
408 | if [ X$g4vis_use_oiwin32 = Xy ] ; then |
---|
409 | G4VIS_USE_OIWIN32=1 |
---|
410 | export G4VIS_USE_OIWIN32 |
---|
411 | echo "On this machine the G4VIS_USE_OIWIN32=\$G4VIS_USE_OIWIN32" |
---|
412 | fi |
---|
413 | |
---|
414 | #+ |
---|
415 | if [ X$g4vis_use_vrml = Xy ] ; then |
---|
416 | G4VIS_USE_VRML=1 |
---|
417 | export G4VIS_USE_VRML |
---|
418 | echo "On this machine the G4VIS_USE_VRML=\$G4VIS_USE_VRML" |
---|
419 | fi |
---|
420 | |
---|
421 | |
---|
422 | #+ |
---|
423 | if [ X$g4vis_use_openglqt = Xy ] ; then |
---|
424 | G4VIS_USE_OPENGLQT=1 |
---|
425 | export G4VIS_USE_OPENGLQT |
---|
426 | echo "On this machine the G4VIS_USE_OPENGLQT=\$G4VIS_USE_OPENGLQT" |
---|
427 | fi |
---|
428 | |
---|
429 | |
---|
430 | fi |
---|
431 | # End of G4VIS_NONE block |
---|
432 | |
---|
433 | |
---|
434 | |
---|
435 | #+ |
---|
436 | if [ X$g4vis_oglhome != X ] ; then |
---|
437 | OGLHOME="$g4vis_oglhome" |
---|
438 | export OGLHOME |
---|
439 | echo "On this machine the OGLHOME=\$OGLHOME" |
---|
440 | fi |
---|
441 | |
---|
442 | #+ |
---|
443 | if [ X$g4vis_oivhome != X ] ; then |
---|
444 | OIVHOME="$g4vis_oivhome" |
---|
445 | export OIVHOME |
---|
446 | if [ X\$g4non_display = X ] ; then |
---|
447 | echo "On this machine the OIVHOME=\$OIVHOME" |
---|
448 | fi |
---|
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 | # Qt Flags and Libs, messy, but needed for backward compatibility |
---|
489 | #+ |
---|
490 | if [ "X$g4ui_build_qt_session" = "Xy" -o "X$g4ui_use_qt" = "Xy" ] ; then |
---|
491 | QTFLAGS="$g4_qt_cxxflags" |
---|
492 | QTLIBS="$g4_qt_libs" |
---|
493 | QTMOC="$g4_qt_moc" |
---|
494 | export QTFLAGS |
---|
495 | export QTLIBS |
---|
496 | export QTMOC |
---|
497 | if [ X\$g4non_display = X ] ; then |
---|
498 | echo "On this machine the QTFLAGS=\$QTFLAGS" |
---|
499 | echo "On this machine the QTLIBS=\$QTLIBS" |
---|
500 | echo "On this machine the QTMOC=\$QTMOC" |
---|
501 | fi |
---|
502 | fi |
---|
503 | |
---|
504 | if [ "X$g4vis_build_openglqt_driver" = "Xy" -o "X$g4vis_build_openglqt_driver" = "Xy" ] ; then |
---|
505 | if [ "X\$QTFLAGS" = "X" ] ; then |
---|
506 | QTFLAGS="$g4_qt_cxxflags $g4_qt_gl_cxxflags" |
---|
507 | else |
---|
508 | QTFLAGS="\$QTFLAGS $g4_qt_gl_cxxflags" |
---|
509 | fi |
---|
510 | if [ "X\$QTMOC" = "X" ] ; then |
---|
511 | QTMOC="$g4_qt_moc" |
---|
512 | fi |
---|
513 | GLQTLIBS="$g4_qt_libs $g4_qt_gl_libs" |
---|
514 | export QTFLAGS |
---|
515 | export QTMOC |
---|
516 | export GLQTLIBS |
---|
517 | if [ X\$g4non_display = X ] ; then |
---|
518 | echo "On this machine the QTFLAGS=\$QTFLAGS" |
---|
519 | echo "On this machine the GLQTLIBS=\$GLQTLIBS" |
---|
520 | echo "On this machine the QTMOC=\$QTMOC" |
---|
521 | fi |
---|
522 | fi |
---|
523 | |
---|
524 | |
---|
525 | # |
---|
526 | # Use GDML module |
---|
527 | # |
---|
528 | #+ |
---|
529 | if [ X$g4lib_build_gdml = Xy ] ; then |
---|
530 | G4LIB_BUILD_GDML=1 |
---|
531 | export G4LIB_BUILD_GDML |
---|
532 | echo "On this machine the G4LIB_BUILD_GDML=\$G4LIB_BUILD_GDML" |
---|
533 | fi |
---|
534 | |
---|
535 | if [ X$g4lib_build_gdml = Xy ] ; then |
---|
536 | XERCESCROOT=$g4gdml_xercesc_root |
---|
537 | export XERCESCROOT |
---|
538 | echo "On this machine the XERCESCROOT=\$XERCESCROOT" |
---|
539 | fi |
---|
540 | |
---|
541 | |
---|
542 | # |
---|
543 | # Use G3TOG4 module |
---|
544 | # |
---|
545 | #+ |
---|
546 | if [ X$g4wlib_build_g3tog4 = Xy ] ; then |
---|
547 | G4LIB_BUILD_G3TOG4=1 |
---|
548 | export G4LIB_BUILD_G3TOG4 |
---|
549 | echo "On this machine the G4LIB_BUILD_G3TOG4=\$G4LIB_BUILD_G3TOG4" |
---|
550 | fi |
---|
551 | |
---|
552 | if [ X$g4w_use_g3tog4 = Xy ] ; then |
---|
553 | G4LIB_USE_G3TOG4=1 |
---|
554 | export G4LIB_USE_G3TOG4 |
---|
555 | echo "On this machine the G4LIB_USE_G3TOG4=\$G4LIB_USE_G3TOG4" |
---|
556 | fi |
---|
557 | |
---|
558 | # |
---|
559 | # Use ZLIB module |
---|
560 | # |
---|
561 | #+ |
---|
562 | if [ X$g4wlib_build_zlib = Xy ] ; then |
---|
563 | G4LIB_BUILD_ZLIB=1 |
---|
564 | export G4LIB_BUILD_ZLIB |
---|
565 | echo "On this machine the G4LIB_BUILD_ZLIB=\$G4LIB_BUILD_ZLIB" |
---|
566 | fi |
---|
567 | |
---|
568 | if [ X$g4w_use_zlib = Xy ] ; then |
---|
569 | G4LIB_USE_ZLIB=1 |
---|
570 | export G4LIB_USE_ZLIB |
---|
571 | echo "On this machine the G4LIB_USE_ZLIB=\$G4LIB_USE_ZLIB" |
---|
572 | fi |
---|
573 | |
---|
574 | #+ |
---|
575 | # |
---|
576 | # g4shared |
---|
577 | # |
---|
578 | if [ X$g4lib_build_shared = Xy ] ; then |
---|
579 | G4LIB_BUILD_SHARED=1 |
---|
580 | export G4LIB_BUILD_SHARED |
---|
581 | echo "On this machine the G4LIB_BUILD_SHARED=\$G4LIB_BUILD_SHARED" |
---|
582 | fi |
---|
583 | |
---|
584 | if [ X$g4lib_build_static = Xy ] ; then |
---|
585 | G4LIB_BUILD_STATIC=1 |
---|
586 | export G4LIB_BUILD_STATIC |
---|
587 | echo "On this machine the G4LIB_BUILD_STATIC=\$G4LIB_BUILD_STATIC" |
---|
588 | fi |
---|
589 | |
---|
590 | #+ |
---|
591 | # |
---|
592 | # g4granular |
---|
593 | # |
---|
594 | if [ X$g4lib_use_granular = Xy ] ; then |
---|
595 | G4LIB_USE_GRANULAR=1 |
---|
596 | export G4LIB_USE_GRANULAR |
---|
597 | echo "On this machine the G4LIB_USE_GRANULAR=\$G4LIB_USE_GRANULAR" |
---|
598 | fi |
---|
599 | |
---|
600 | ##################################################################### |
---|
601 | |
---|
602 | ##################################################################### |
---|
603 | # Create GNUmakefile.db to keep ALL GNUmakefile DB :) |
---|
604 | |
---|
605 | if test -f \$G4INSTALL/config/scripts/GNUmakefile.db ; then |
---|
606 | mv \$G4INSTALL/config/scripts/GNUmakefile.db \$G4LIB/\$G4SYSTEM/GNUmakefile.db.bac |
---|
607 | fi |
---|
608 | |
---|
609 | # Be careful: first time there is no $G4LIB! |
---|
610 | |
---|
611 | mkdir -p \$G4LIB/\$G4SYSTEM |
---|
612 | |
---|
613 | $g4make -n -p -f \$G4INSTALL/config/scripts/GNUmakefile > \$G4LIB/\$G4SYSTEM/GNUmakefile.db |
---|
614 | |
---|
615 | echo "" |
---|
616 | echo "Starting build..." |
---|
617 | echo "" |
---|
618 | cd $g4install/source |
---|
619 | #echo `pwd` |
---|
620 | |
---|
621 | # There is no env! |
---|
622 | if [ X$g4global = Xy ] ; then |
---|
623 | echo "" |
---|
624 | rm -rf $g4conf/g4make.log |
---|
625 | $g4make global 2>&1 | tee $g4conf/g4make.log |
---|
626 | fi |
---|
627 | |
---|
628 | # There is env for binaries - for User: should be set in env.[c]sh! |
---|
629 | if [ X$g4granular = Xy ] ; then |
---|
630 | G4LIB_USE_GRANULAR=1 |
---|
631 | export G4LIB_USE_GRANULAR |
---|
632 | rm -rf $g4conf/g4make.log |
---|
633 | $g4make 2>&1 | tee $g4conf/g4make.log |
---|
634 | fi |
---|
635 | |
---|
636 | if [ X$g4lib_build_dll = Xy ] ; then |
---|
637 | echo "" |
---|
638 | rm -rf $g4conf/g4make.log |
---|
639 | $g4make dll 2>&1 | tee $g4conf/g4make.log |
---|
640 | fi |
---|
641 | |
---|
642 | if [ X$g4lib_build_dyn = Xy ] ; then |
---|
643 | echo "" |
---|
644 | rm -rf $g4conf/g4make.log |
---|
645 | $g4make global G4LIB_BUILD_SHARED=1 2>&1 | tee $g4conf/g4make.log |
---|
646 | fi |
---|
647 | |
---|
648 | # Check for errors in log file |
---|
649 | if test -f \$g4conf/g4make.log ; then |
---|
650 | |
---|
651 | # There are two (at least) shells 'sh' and 'bash' with |
---|
652 | # different arithmetic expansion...So we are doing it by 'text' |
---|
653 | # in two steps... |
---|
654 | |
---|
655 | err=\`grep " Error " $g4conf/g4make.log | wc -w\` |
---|
656 | int=\`grep " Interrupt " $g4conf/g4make.log | wc -w\` |
---|
657 | stp=\`grep Stop\. $g4conf/g4make.log | wc -w\` |
---|
658 | |
---|
659 | err2=\`echo \$err\` |
---|
660 | int2=\`echo \$int\` |
---|
661 | stp2=\`echo \$stp\` |
---|
662 | |
---|
663 | if [ X\$err2 = X0 -a X\$int2 = X0 ] ; then |
---|
664 | echo "" |
---|
665 | echo "####################################################" |
---|
666 | echo "# Your Geant4 installation seems to be successful! " |
---|
667 | echo "# To be sure please have a look into the log file: " |
---|
668 | echo "# $g4conf/g4make.log " |
---|
669 | echo "####################################################" |
---|
670 | echo "" |
---|
671 | else |
---|
672 | echo "" |
---|
673 | echo "############################################################" |
---|
674 | echo "# It looks like you had errors during Geant4 installation " |
---|
675 | echo "# (or interrupted installation)! " |
---|
676 | echo "# Please check log file: " |
---|
677 | echo "# $g4conf/g4make.log " |
---|
678 | echo "############################################################" |
---|
679 | echo "" |
---|
680 | fi |
---|
681 | else |
---|
682 | echo "" |
---|
683 | echo "############################################################" |
---|
684 | echo "# It looks like you had errors during Geant4 installation " |
---|
685 | echo "# (or interrupted installation)! " |
---|
686 | echo "# You have no log file: " |
---|
687 | echo "# $g4conf/g4make.log " |
---|
688 | echo "############################################################" |
---|
689 | echo "" |
---|
690 | fi |
---|
691 | |
---|
692 | !GROK!THIS! |
---|
693 | |
---|
694 | : In the following dollars and backticks do not need the extra backslash. |
---|
695 | $spitshell >>install.sh <<'!NO!SUBS!' |
---|
696 | !NO!SUBS! |
---|
697 | chmod 755 install.sh |
---|
698 | $eunicefix install.sh |
---|
699 | |
---|