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