diff options
author | Leah Rowe <leah@libreboot.org> | 2025-05-27 12:59:42 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2025-06-05 23:40:33 +0100 |
commit | 677dfc4d103f01b2d6c3b9d9b92011523e248308 (patch) | |
tree | df7fe860addf51dc3e1c3bf537cb6c8fa044fca1 | |
parent | 267d4c903413c4eccc4271b00f872a7dd3d1a165 (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.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/tree.sh b/include/tree.sh index 11607eed..df03333f 100644 --- a/include/tree.sh +++ b/include/tree.sh @@ -302,8 +302,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() |