handle/make/file: run make-clean first

flashrom distclean resulted in zero status upon exit,
but did not remove the actual flashrom binary.

our logic was to run distclean and defer to clean;
now, we run clean and *then* run distclean, but we
do not throw an error if distclean fails. (we do
throw one if clean fails)

Signed-off-by: Leah Rowe <leah@libreboot.org>
btrfsvols
Leah Rowe 2023-09-10 17:13:47 +01:00
parent 12f9afe622
commit 0543350d44
1 changed files with 3 additions and 2 deletions

View File

@ -71,8 +71,9 @@ run_make_command()
make -C "${project}" -j$(nproc) || \
err "run_make_command: !make -C ${project}"
else
make -C "${project}" distclean || make -C "${project}" clean \
|| err "run_make_command: ${project}: make-clean failed"
make -C "${project}" clean || \
err "run_make_command: ${project}: make-clean failed"
make -C "${project}" distclean || :
fi
}