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