ENH: relocate WM_PROJECT_SITE default (issue #1050)

- was PREFIX/site, now PROJECT/site

  This avoids several issues when installing OpenFOAM in clusters
  without an intermediate OpenFOAM-specific installation prefix.

  The 'site' directory may have a reserved meaning in these situations
  and it is undesirable to 'leak' upwards into the parent directory to
  look for configuration files.

  Placing the default within the project directory avoids this.
  Alternative locations can be given via the WM_PROJECT_SITE variable.
This commit is contained in:
Mark Olesen
2018-11-29 18:04:44 +01:00
parent be46f96862
commit 9e094f1f07
11 changed files with 23 additions and 25 deletions

View File

@ -154,7 +154,7 @@ setenv FOAM_EXT_LIBBIN $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER$WM_PRE
if ( $?WM_PROJECT_SITE ) then
set siteDir=$WM_PROJECT_SITE
else
set siteDir=$WM_PROJECT_INST_DIR/site
set siteDir=$WM_PROJECT_DIR/site
endif
# Shared site (group) executables/libraries
@ -177,7 +177,6 @@ endif
if ( -d "$siteDir/$WM_PROJECT_VERSION/bin" ) then # Version-specific
_foamAddPath "$siteDir/$WM_PROJECT_VERSION/bin"
endif
unset siteDir
_foamAddPath ${FOAM_USER_APPBIN}:${FOAM_SITE_APPBIN}:${FOAM_APPBIN}
_foamAddLib $FOAM_LIBBIN/dummy # Dummy versions of external libraries last
@ -333,7 +332,7 @@ endsw
# Cleanup
# ~~~~~~~
unset archDir
unset archDir siteDir
unset gcc_version gccDir
unset gmp_version gmpDir mpfr_version mpfrDir mpc_version mpcDir
unset clang_version clangDir