Resolve "modbuild: cleanup source and build directory before and after building"

This commit is contained in:
2024-03-22 15:35:01 +01:00
parent 6c70eb37f0
commit 0ffdf599a1
3 changed files with 10 additions and 23 deletions
+4 -2
View File
@@ -1570,7 +1570,7 @@ _build_module() {
}
cleanup_build() {
[[ ${enable_cleanup_build} == yes ]] || return 0
[[ ${enable_cleanup_build} != 'yes' ]] && return 0
[[ "${BUILD_DIR}" == "${SRC_DIR}" ]] && return 0
{
cd "/${BUILD_DIR}/.." || std::die 42 "Internal error"
@@ -1590,7 +1590,7 @@ _build_module() {
}
cleanup_src() {
[[ ${enable_cleanup_src} == yes ]] || return 0
[[ ${enable_cleanup_src} != 'yes' ]] && return 0
{
cd "/${SRC_DIR}/.." || std::die 42 "Internal error"
[[ $(pwd) == / ]] && \
@@ -1799,6 +1799,8 @@ _build_module() {
"%s " \
"${module_name}/${module_version}:" \
"start building ..."
cleanup_build
cleanup_src
compile_and_install
post_install
fi