summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-09-20 14:41:24 +0100
committerLeah Rowe <leah@libreboot.org>2026-09-20 14:41:24 +0100
commitd0c58fbfe04bfaf5bdc9c4d2ce1e57c16913e648 (patch)
treeb8e21207fe86018c1572da93c46debc15fb76898
parent9dcc57a1a94604682d52108d7dcd27a15703874c (diff)
mk: don't build sources if using ./mk -f
otherwise, dry builds are conducted, which pollutes src tarballs. this was a regression introduced by the recent multi-tree-only design change. this should hopefully be the only regression. Signed-off-by: Leah Rowe <leah@libreboot.org>
-rwxr-xr-xmk9
1 files changed, 5 insertions, 4 deletions
diff --git a/mk b/mk
index 981b18c9..bd0d1b21 100755
--- a/mk
+++ b/mk
@@ -83,7 +83,7 @@ eval "$(printf "version release download inject\n" | awk '{ for (i=1; i<=NF; \
if_make_config=":"
if_build=":" # can be false even if make is true
if_dry_build=":"
-eval "`newvar if_not_make_config if_not_build if_not_dry_build`"
+eval "`newvar if_not_make_config if_not_build if_not_dry_build if_not_fetch`"
# these variables will also be initialised in configure_target
cfgvars="autogenargs cmakedir configureargs badhash badtghash bootstrapargs \
@@ -118,6 +118,7 @@ main()
if_not_dry_build=":"
;;
-f|-F) # download source code for a project
+ if_not_fetch=":"
if_dry_build=""
if_not_dry_build=":"
[ "$flag" = "-F" ] && \
@@ -198,9 +199,9 @@ handle_target()
target_dir="$configdir/$target"
configure_target "$target_dir" && \
- x_ handle_buildcfg
+ $if_not_fetch x_ handle_buildcfg
- $if_build \
+ $if_build $if_not_fetch \
x_ $postmake; :
}
@@ -217,7 +218,7 @@ configure_target()
[ -z "$tree" ] && \
err "$project/$target: tree unset" configure_target "$@"
- $if_build $if_not_dry_build \
+ $if_build $if_not_dry_build $if_not_fetch \
mk_dependencies -b $build_depend
srcdir="src/$project/$tree"