handle/config/file: unified distclean handling

use build/src/for -c which does the same thing,
specifically: try distclean, then clean, or fail

Signed-off-by: Leah Rowe <leah@libreboot.org>
btrfsvols
Leah Rowe 2023-08-27 11:35:02 +01:00
parent 197464bc4b
commit 27c67295c7
1 changed files with 3 additions and 8 deletions

View File

@ -223,8 +223,7 @@ check_config()
run_make_command()
{
make -C "${codedir}" distclean || \
make -C "${codedir}" clean || \
./build src for -c "${codedir}"
fail "run_make_command: make distclean/clean failed"
cp "${config}" "${codedir}/.config" || \
@ -248,17 +247,13 @@ copy_elf()
fail "copy_elf: cannot copy elf file"
done
make -C "${codedir}" distclean || \
make -C "${codedir}" clean || \
./handle src for -c "${codedir}" || \
fail "copy_elf: clean: ${codedir} (${project}/${target})"
}
fail()
{
[ -z "${codedir}" ] || \
make -C "${codedir}" distclean \
|| make -C "${codedir}" clean || :
[ -z "${codedir}" ] || ./handle src for -c "${codedir}" || :
err "${1}"
}