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