From 27c67295c73dd0dc78c347cf653a69b284f0fc64 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Sun, 27 Aug 2023 11:35:02 +0100 Subject: 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 --- resources/scripts/handle/config/file | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/resources/scripts/handle/config/file b/resources/scripts/handle/config/file index 5e32fed4..13d65ad3 100755 --- a/resources/scripts/handle/config/file +++ b/resources/scripts/handle/config/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}" } -- cgit v1.2.1