[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 move.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 >move.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 | #+ |
---|
[483] | 98 | #if [ X$g4elasticdata != X ] ; then |
---|
| 99 | #G4ELASTICDATA="$g4elasticdata" |
---|
| 100 | #export G4ELASTICDATA |
---|
| 101 | #echo "On this machine the G4ELASTICDATA=\$G4ELASTICDATA" |
---|
| 102 | #fi |
---|
[472] | 103 | |
---|
| 104 | # |
---|
| 105 | # g4clhep.U |
---|
| 106 | # |
---|
| 107 | if [ X$g4clhep_base_dir != X/usr -o X$g4clhep_base_dir != X/usr/local ] ; 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 | #+ |
---|
| 114 | if [ X$g4clhep_include_dir != X ] ; then |
---|
| 115 | CLHEP_INCLUDE_DIR="$g4clhep_include_dir" |
---|
| 116 | export CLHEP_INCLUDE_DIR |
---|
| 117 | echo "On this machine the CLHEP_INCLUDE_DIR=\$CLHEP_INCLUDE_DIR" |
---|
| 118 | fi |
---|
| 119 | |
---|
| 120 | #+ |
---|
| 121 | if [ X$g4clhep_lib_dir != X ] ; then |
---|
| 122 | CLHEP_LIB_DIR="$g4clhep_lib_dir" |
---|
| 123 | export CLHEP_LIB_DIR |
---|
| 124 | echo "On this machine the CLHEP_LIB_DIR=\$CLHEP_LIB_DIR" |
---|
| 125 | fi |
---|
| 126 | |
---|
| 127 | #+ |
---|
| 128 | if [ X$g4clhep_lib != X ] ; then |
---|
| 129 | CLHEP_LIB="$g4clhep_lib" |
---|
| 130 | export CLHEP_LIB |
---|
| 131 | echo "On this machine the CLHEP_LIB=\$CLHEP_LIB" |
---|
| 132 | fi |
---|
| 133 | |
---|
| 134 | #+ |
---|
| 135 | # |
---|
| 136 | # g4debug |
---|
| 137 | # |
---|
[483] | 138 | if [ X$g4debug = Xy ] ; then |
---|
| 139 | G4DEBUG=1 |
---|
[472] | 140 | export G4DEBUG |
---|
| 141 | echo "On this machine the G4DEBUG=\$G4DEBUG" |
---|
| 142 | fi |
---|
| 143 | |
---|
| 144 | # |
---|
| 145 | # g4analysis |
---|
| 146 | # |
---|
| 147 | #+ |
---|
| 148 | if [ X$g4wanalysis_use = Xy ] ; then |
---|
| 149 | G4ANALYSIS_USE=1 |
---|
| 150 | export G4ANALYSIS_USE |
---|
| 151 | echo "On this machine the G4ANALYSIS_USE=\$G4ANALYSIS_USE" |
---|
| 152 | fi |
---|
| 153 | |
---|
| 154 | # |
---|
| 155 | # g4ui |
---|
| 156 | # |
---|
| 157 | #+ |
---|
| 158 | if [ X$g4ui_build_xaw_session = Xy ] ; then |
---|
| 159 | G4UI_BUILD_XAW_SESSION=1 |
---|
| 160 | export G4UI_BUILD_XAW_SESSION |
---|
| 161 | echo "On this machine the G4UI_BUILD_XAW_SESSION=\$G4UI_BUILD_XAW_SESSION" |
---|
| 162 | fi |
---|
| 163 | |
---|
| 164 | #+ |
---|
| 165 | if [ X$g4ui_use_xaw = Xy ] ; then |
---|
| 166 | G4UI_USE_XAW=1 |
---|
| 167 | export G4UI_USE_XAW |
---|
| 168 | echo "On this machine the G4UI_USE_XAW=\$G4UI_USE_XAW" |
---|
| 169 | fi |
---|
| 170 | |
---|
| 171 | #+ |
---|
| 172 | if [ X$g4ui_build_xm_session = Xy ] ; then |
---|
| 173 | G4UI_BUILD_XM_SESSION=1 |
---|
| 174 | export G4UI_BUILD_XM_SESSION |
---|
| 175 | echo "On this machine the G4UI_BUILD_XM_SESSION=\$G4UI_BUILD_XM_SESSION" |
---|
| 176 | fi |
---|
| 177 | |
---|
| 178 | #+ |
---|
| 179 | if [ X$g4ui_use_xm = Xy ] ; then |
---|
| 180 | G4UI_USE_XM=1 |
---|
| 181 | export G4UI_USE_XM |
---|
| 182 | echo "On this machine the G4UI_USE_XM=\$G4UI_USE_XM" |
---|
| 183 | fi |
---|
| 184 | |
---|
| 185 | #+ |
---|
| 186 | if [ X$g4ui_build_win32_session = Xy ] ; then |
---|
| 187 | G4UI_BUILD_WIN32_SESSION=1 |
---|
| 188 | export G4UI_BUILD_WIN32_SESSION |
---|
| 189 | echo "On this machine the G4UI_BUILD_WIN32_SESSION=\$G4UI_BUILD_WIN32_SESSION" |
---|
| 190 | fi |
---|
| 191 | |
---|
| 192 | #+ |
---|
| 193 | if [ X$g4ui_use_win32 = Xy ] ; then |
---|
| 194 | G4UI_USE_WIN32=1 |
---|
| 195 | export G4UI_USE_WIN32 |
---|
| 196 | echo "On this machine the G4UI_USE_WIN32=\$G4UI_USE_WIN32" |
---|
| 197 | fi |
---|
| 198 | |
---|
| 199 | # |
---|
| 200 | # g4vis |
---|
| 201 | # |
---|
| 202 | #+ |
---|
| 203 | if [ X$g4vis_build_dawn_driver = Xy ] ; then |
---|
| 204 | G4VIS_BUILD_DAWN_DRIVER=1 |
---|
| 205 | export G4VIS_BUILD_DAWN_DRIVER |
---|
| 206 | echo "On this machine the G4VIS_BUILD_DAWN_DRIVER=\$G4VIS_BUILD_DAWN_DRIVER" |
---|
| 207 | fi |
---|
| 208 | |
---|
| 209 | #+ |
---|
| 210 | if [ X$g4vis_build_openglx_driver = Xy ] ; then |
---|
| 211 | G4VIS_BUILD_OPENGLX_DRIVER=1 |
---|
| 212 | export G4VIS_BUILD_OPENGLX_DRIVER |
---|
| 213 | echo "On this machine the G4VIS_BUILD_OPENGLX_DRIVER=\$G4VIS_BUILD_OPENGLX_DRIVER" |
---|
| 214 | fi |
---|
| 215 | |
---|
| 216 | #+ |
---|
| 217 | if [ X$g4vis_build_openglxm_driver = Xy ] ; then |
---|
| 218 | G4VIS_BUILD_OPENGLXM_DRIVER=1 |
---|
| 219 | export G4VIS_BUILD_OPENGLXM_DRIVER |
---|
| 220 | echo "On this machine the G4VIS_BUILD_OPENGLXM_DRIVER=\$G4VIS_BUILD_OPENGLXM_DRIVER" |
---|
| 221 | fi |
---|
| 222 | |
---|
| 223 | #+ |
---|
| 224 | if [ X$g4vis_build_openglwin32_driver = Xy ] ; then |
---|
| 225 | G4VIS_BUILD_OPENGLWIN32_DRIVER=1 |
---|
| 226 | export G4VIS_BUILD_OPENGLWIN32_DRIVER |
---|
| 227 | echo "On this machine the G4VIS_BUILD_OPENGLWIN32_DRIVER=\$G4VIS_BUILD_OPENGLWIN32_DRIVER" |
---|
| 228 | fi |
---|
| 229 | |
---|
| 230 | #+ |
---|
| 231 | if [ X$g4vis_build_oix_driver = Xy ] ; then |
---|
| 232 | G4VIS_BUILD_OIX_DRIVER=1 |
---|
| 233 | export G4VIS_BUILD_OIX_DRIVER |
---|
| 234 | echo "On this machine the G4VIS_BUILD_OIX_DRIVER=\$G4VIS_BUILD_OIX_DRIVER" |
---|
| 235 | fi |
---|
| 236 | |
---|
| 237 | #+ |
---|
| 238 | if [ X$g4vis_build_oiwin32_driver = Xy ] ; then |
---|
| 239 | G4VIS_BUILD_OIWIN32_DRIVER=1 |
---|
| 240 | export G4VIS_BUILD_OIWIN32_DRIVER |
---|
| 241 | echo "On this machine the G4VIS_BUILD_OIWIN32_DRIVER=\$G4VIS_BUILD_OIWIN32_DRIVER" |
---|
| 242 | fi |
---|
| 243 | |
---|
| 244 | #+ |
---|
| 245 | if [ X$g4vis_build_vrml_driver = Xy ] ; then |
---|
| 246 | G4VIS_BUILD_VRML_DRIVER=1 |
---|
| 247 | export G4VIS_BUILD_VRML_DRIVER |
---|
| 248 | echo "On this machine the G4VIS_BUILD_VRML_DRIVER=\$G4VIS_BUILD_VRML_DRIVER" |
---|
| 249 | fi |
---|
| 250 | |
---|
| 251 | #+ |
---|
| 252 | if [ X$g4vis_use_dawn = Xy ] ; then |
---|
| 253 | G4VIS_USE_DAWN=1 |
---|
| 254 | export G4VIS_USE_DAWN |
---|
| 255 | echo "On this machine the G4VIS_USE_DAWN=\$G4VIS_USE_DAWN" |
---|
| 256 | fi |
---|
| 257 | |
---|
| 258 | #+ |
---|
| 259 | if [ X$g4vis_use_openglx = Xy ] ; then |
---|
| 260 | G4VIS_USE_OPENGLX=1 |
---|
| 261 | export G4VIS_USE_OPENGLX |
---|
| 262 | echo "On this machine the G4VIS_USE_OPENGLX=\$G4VIS_USE_OPENGLX" |
---|
| 263 | fi |
---|
| 264 | |
---|
| 265 | #+ |
---|
| 266 | if [ X$g4vis_use_openglxm = Xy ] ; then |
---|
| 267 | G4VIS_USE_OPENGLXM=1 |
---|
| 268 | export G4VIS_USE_OPENGLXM |
---|
| 269 | echo "On this machine the G4VIS_USE_OPENGLXM=\$G4VIS_USE_OPENGLXM" |
---|
| 270 | fi |
---|
| 271 | |
---|
| 272 | #+ |
---|
| 273 | if [ X$g4vis_use_openglwin32 = Xy ] ; then |
---|
| 274 | G4VIS_USE_OPENGLWIN32=1 |
---|
| 275 | export G4VIS_USE_OPENGLWIN32 |
---|
| 276 | echo "On this machine the G4VIS_USE_OPENGLWIN32=\$G4VIS_USE_OPENGLWIN32" |
---|
| 277 | fi |
---|
| 278 | |
---|
| 279 | #+ |
---|
| 280 | if [ X$g4vis_use_oix = Xy ] ; then |
---|
| 281 | G4VIS_USE_OIX=1 |
---|
| 282 | export G4VIS_USE_OIX |
---|
| 283 | echo "On this machine the G4VIS_USE_OIX=\$G4VIS_USE_OIX" |
---|
| 284 | fi |
---|
| 285 | |
---|
| 286 | #+ |
---|
| 287 | if [ X$g4vis_use_oiwin32 = Xy ] ; then |
---|
| 288 | G4VIS_USE_OIWIN32=1 |
---|
| 289 | export G4VIS_USE_OIWIN32 |
---|
| 290 | echo "On this machine the G4VIS_USE_OIWIN32=\$G4VIS_USE_OIWIN32" |
---|
| 291 | fi |
---|
| 292 | |
---|
| 293 | #+ |
---|
| 294 | if [ X$g4vis_use_vrml = Xy ] ; then |
---|
| 295 | G4VIS_USE_VRML=1 |
---|
| 296 | export G4VIS_USE_VRML |
---|
| 297 | echo "On this machine the G4VIS_USE_VRML=\$G4VIS_USE_VRML" |
---|
| 298 | fi |
---|
| 299 | |
---|
| 300 | #+ |
---|
| 301 | if [ X$g4vis_oglhome != X ] ; then |
---|
| 302 | OGLHOME="$g4vis_oglhome" |
---|
| 303 | export OGLHOME |
---|
| 304 | echo "On this machine the OGLHOME=\$OGLHOME" |
---|
| 305 | fi |
---|
| 306 | |
---|
| 307 | # |
---|
| 308 | # Use G3TOG4 module |
---|
| 309 | # |
---|
| 310 | #+ |
---|
| 311 | if [ X$g4wlib_build_g3tog4 = Xy ] ; then |
---|
| 312 | G4LIB_BUILD_G3TOG4=1 |
---|
| 313 | export G4LIB_BUILD_G3TOG4 |
---|
| 314 | echo "On this machine the G4LIB_BUILD_G3TOG4=\$G4LIB_BUILD_G3TOG4" |
---|
| 315 | fi |
---|
| 316 | |
---|
| 317 | if [ X$g4w_use_g3tog4 = Xy ] ; then |
---|
| 318 | G4LIB_USE_G3TOG4=1 |
---|
| 319 | export G4LIB_USE_G3TOG4 |
---|
| 320 | echo "On this machine the G4LIB_USE_G3TOG4=\$G4LIB_USE_G3TOG4" |
---|
| 321 | fi |
---|
| 322 | |
---|
| 323 | # |
---|
| 324 | # Use ZLIB module |
---|
| 325 | # |
---|
| 326 | #+ |
---|
| 327 | if [ X$g4wlib_build_zlib = Xy ] ; then |
---|
| 328 | G4LIB_BUILD_ZLIB=1 |
---|
| 329 | export G4LIB_BUILD_ZLIB |
---|
| 330 | echo "On this machine the G4LIB_BUILD_ZLIB=\$G4LIB_BUILD_ZLIB" |
---|
| 331 | fi |
---|
| 332 | |
---|
| 333 | if [ X$g4w_use_zlib = Xy ] ; then |
---|
| 334 | G4LIB_USE_ZLIB=1 |
---|
| 335 | export G4LIB_USE_ZLIB |
---|
| 336 | echo "On this machine the G4LIB_USE_ZLIB=\$G4LIB_USE_ZLIB" |
---|
| 337 | fi |
---|
| 338 | |
---|
| 339 | |
---|
| 340 | #+ |
---|
| 341 | # |
---|
| 342 | # g4shared |
---|
| 343 | # |
---|
| 344 | if [ X$g4lib_build_shared = Xy ] ; then |
---|
| 345 | G4LIB_BUILD_SHARED=1 |
---|
| 346 | export G4LIB_BUILD_SHARED |
---|
| 347 | echo "On this machine the G4LIB_BUILD_SHARED=\$G4LIB_BUILD_SHARED" |
---|
| 348 | fi |
---|
| 349 | |
---|
| 350 | if [ X$g4lib_build_static = Xy ] ; then |
---|
| 351 | G4LIB_BUILD_STATIC=1 |
---|
| 352 | export G4LIB_BUILD_STATIC |
---|
| 353 | echo "On this machine the G4LIB_BUILD_STATIC=\$G4LIB_BUILD_STATIC" |
---|
| 354 | fi |
---|
| 355 | |
---|
| 356 | #+ |
---|
| 357 | # |
---|
| 358 | # g4granular |
---|
| 359 | # |
---|
| 360 | if [ X$g4lib_use_granular = Xy ] ; then |
---|
| 361 | G4LIB_USE_GRANULAR=1 |
---|
| 362 | export G4LIB_USE_GRANULAR |
---|
| 363 | echo "On this machine the G4LIB_USE_GRANULAR=\$G4LIB_USE_GRANULAR" |
---|
| 364 | fi |
---|
| 365 | |
---|
| 366 | ##################################################################### |
---|
| 367 | |
---|
| 368 | ##################################################################### |
---|
| 369 | |
---|
| 370 | echo "" |
---|
| 371 | echo "Starting installation..." |
---|
| 372 | echo "" |
---|
| 373 | |
---|
| 374 | cd $g4install |
---|
| 375 | #echo `pwd` |
---|
| 376 | |
---|
| 377 | |
---|
| 378 | # Remove 'verbosity' in 'tar' command |
---|
| 379 | # If not INCLUDE then install full tree in 'src' directory! |
---|
| 380 | # |
---|
| 381 | if [ X$g4includes_flag = Xn ] ; then |
---|
| 382 | if [ X$g4install != X$g4final_install ] ; then |
---|
| 383 | echo "" |
---|
| 384 | echo "Installing sources and headers..." |
---|
| 385 | echo "" |
---|
| 386 | mkdir -p $g4final_install/src/geant4/ |
---|
| 387 | tar cf - Configure config/ source/ environments/ physics_lists/ examples/ |(cd $g4final_install/src/geant4/; tar xf -) |
---|
| 388 | fi |
---|
| 389 | fi |
---|
| 390 | |
---|
| 391 | ######################################## |
---|
| 392 | # There is no env! |
---|
| 393 | if [ X$g4includes_flag = Xy ] ; then |
---|
| 394 | |
---|
| 395 | if [ X$g4install != X$g4final_install ] ; then |
---|
| 396 | echo "" |
---|
| 397 | echo "Installing sources..." |
---|
| 398 | echo "" |
---|
| 399 | |
---|
| 400 | mkdir -p $g4final_install/src/geant4/ |
---|
| 401 | tar cf - Configure config/ source/ environments/ physics_lists/ examples/ |(cd $g4final_install/src/geant4/; tar xf -) |
---|
| 402 | fi |
---|
| 403 | |
---|
| 404 | echo "" |
---|
| 405 | echo "Installing headers..." |
---|
| 406 | echo "" |
---|
| 407 | cd $g4install/source |
---|
| 408 | $g4make includes dependencies="" |
---|
| 409 | fi |
---|
| 410 | |
---|
| 411 | # Move libraries |
---|
| 412 | if [ X$g4install != X$g4final_install ] ; then |
---|
| 413 | echo "" |
---|
| 414 | echo "Installing libraries..." |
---|
| 415 | echo "" |
---|
| 416 | mkdir -p $g4final_install/lib/geant4 |
---|
| 417 | cd $g4install/lib |
---|
| 418 | tar cf - $g4system |(cd $g4final_install/lib/geant4; tar xf -) |
---|
| 419 | fi |
---|
| 420 | |
---|
| 421 | # For the reason of strange behaivior for DOTted directory... |
---|
| 422 | mkdir -p $g4final_install/src/geant4/.config |
---|
| 423 | cd $g4install/.config |
---|
| 424 | tar cf - . |(cd $g4final_install/src/geant4/.config; tar xf -) |
---|
| 425 | |
---|
| 426 | |
---|
| 427 | !GROK!THIS! |
---|
| 428 | |
---|
| 429 | : In the following dollars and backticks do not need the extra backslash. |
---|
| 430 | $spitshell >>move.sh <<'!NO!SUBS!' |
---|
| 431 | !NO!SUBS! |
---|
| 432 | chmod 755 move.sh |
---|
| 433 | $eunicefix move.sh |
---|
| 434 | |
---|