mk: use distclean when available

this removes stale .config files in coreboot src

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-09-20 17:19:40 +01:00
parent 40d4acbf5b
commit 29b571fb4e
+11 -5
View File
@@ -363,8 +363,7 @@ check_xgcc()
handle_makefile() handle_makefile()
{ {
check_makefile "$srcdir" && $if_not_dry_build \ clean_src
x_ make -C "$srcdir" clean $cleanargs
[ -f "$buildcfg" ] && \ [ -f "$buildcfg" ] && \
x_ cp "$buildcfg" "$srcdir/$cfgname" x_ cp "$buildcfg" "$srcdir/$cfgname"
@@ -430,9 +429,16 @@ copy_elf()
"cannot read '$listfile'" "copy_elf" "$@"; : "cannot read '$listfile'" "copy_elf" "$@"; :
fi fi
check_makefile "$srcdir" || return 1 clean_src
( x_ make -C "$srcdir" clean $cleanargs ) || \ }
err "can't make-clean '$srcdir'" "copy_elf" "$@"; :
clean_src()
{
check_makefile "$srcdir" || return 0
$if_dry_build return 0
make -C "$srcdir" distclean $cleanargs || \
x_ make -C "$srcdir" clean $cleanargs
} }
x_ main "$_f" "$@" x_ main "$_f" "$@"