Merge branch '245-build-system-cleanup-before-build-fails' into 'master'

Resolve "build-system: cleanup before build fails"

Closes #245

See merge request Pmodules/src!221
This commit is contained in:
2024-04-09 09:46:03 +02:00
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -13,7 +13,7 @@
(issues #235, #243)
* Files in `$PMODULES_TMPDIR/<module>` are now removed before
and after building a module (except cleanup has been disbaled).
(issue #242)
(issues #242, #245)
* Set prefix and directory/name of modulefile based on group not on
environment variables like `{COMPILER,MPI,HDF5}_VERSION` (issue #244)
+2
View File
@@ -1551,6 +1551,7 @@ _build_module() {
cleanup_build() {
[[ ${enable_cleanup_build} != 'yes' ]] && return 0
[[ "${BUILD_DIR}" == "${SRC_DIR}" ]] && return 0
[[ -d "${BUILD_DIR}/../.." ]] || return 0
{
cd "/${BUILD_DIR}/.." || std::die 42 "Internal error"
[[ "$(${pwd})" == "/" ]] && \
@@ -1570,6 +1571,7 @@ _build_module() {
cleanup_src() {
[[ ${enable_cleanup_src} != 'yes' ]] && return 0
[[ -d "${BUILD_DIR}/../.." ]] || return 0
{
cd "/${SRC_DIR}/.." || std::die 42 "Internal error"
[[ $(pwd) == / ]] && \