From 7507655d3410b5b7589a027e15b9712ed901e629 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Tue, 15 Sep 2026 20:20:03 +0100 Subject: [PATCH] simplified make-clean handling no point using distclean, because the context there is providing clean sources for distribution, but we use ./mk release which tars everything up before ever running any build commands. make-clean is enough distclean is a stupid gnuism anyway, and most makefiles that have it will just do the same as clean anyway Signed-off-by: Leah Rowe --- mk | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/mk b/mk index 10905ab8..ed2c666a 100755 --- a/mk +++ b/mk @@ -117,7 +117,7 @@ main() -b) : ;; -u) mode="oldconfig" ;; -m) mode="menuconfig" ;; - -c) mode="distclean" ;; + -c) mode="clean" ;; -x) mode="crossgcc-clean" ;; -f|-F) # download source code for a project # macros. colon means false. @@ -208,9 +208,6 @@ single_tree_build() $if_not_dry_build elfcheck || \ return 0 - $if_make_clean \ - eval mode="clean" - run_make_command || \ return 0 @@ -262,7 +259,6 @@ handle_defconfig() err "$configdir: 'tree' not set" "handle_defconfig" "$@" srcdir="src/$project/$tree" - [ ! -d "$srcdir" ] && \ $if_not_make_clean \ return 0 @@ -281,11 +277,7 @@ handle_defconfig() continue; : for _xarch in $xarch; do - $if_not_build \ - break - $if_dry_build \ - break - [ -n "$_xarch" ] && \ + [ -n "$_xarch" ] && $if_not_build $if_dry_build \ check_cross_compiler "$_xarch"; : done; :