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