summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2025-05-27 12:59:42 +0100
committerLeah Rowe <leah@libreboot.org>2025-05-27 13:03:13 +0100
commit49b02b759fbfbeb862d61045637fcb1e0dbc8853 (patch)
tree73031e102470661d229971a3e85d970b6cf222bf
parentf4a1d2217fe3d4b8b7ec29326a52a5eb25368f55 (diff)
tree.sh: more reliable clean in run_make_command
Don't do no-op if it fails; fall back to "clean" instead, and fail if that fails. The no-op was there was not all projects have distclean, but we do intend for them all to be cleaned. We mitigate further error by only running make-clean if a makefile exists. Signed-off-by: Leah Rowe <leah@libreboot.org>
-rw-r--r--include/tree.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/tree.sh b/include/tree.sh
index a2d4c378..54de692b 100644
--- a/include/tree.sh
+++ b/include/tree.sh
@@ -292,8 +292,10 @@ run_make_command()
$dry x_ make -C "$srcdir" $mode -j$XBMK_THREADS $makeargs
[ -n "$mode" ] || x_ $mkhelper
+ check_makefile "$srcdir" || return 0
[ "$mode" != "clean" ] || \
- $dry make -C "$srcdir" $cleanargs distclean || :; :
+ $dry make -C "$srcdir" $cleanargs distclean || \
+ $dry x_ make -C "$srcdir" $cleanargs clean; :
}
check_cmake()