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