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