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>
This commit is contained in:
Leah Rowe
2025-05-27 12:59:42 +01:00
parent f4a1d2217f
commit 49b02b759f
+3 -1
View File
@@ -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()