summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-09-15 20:38:08 +0100
committerLeah Rowe <leah@libreboot.org>2026-09-15 20:38:08 +0100
commit59cbc1784cc2f1e7d80ab93eaebdb71f5f2b3a49 (patch)
treece21397ebcd661541791c0efd06b774487baf3e4
parent6725b616f328f44faa8c2a386875b54fc8144093 (diff)
mk: remove -c and -x commands (clean/xgcc-clean)
the user never runs these. it's not needed. the design of lbmk already cleans everything, or caches everything, between builds. everything cached out of tree. it's not expected to ever need to clean manually, so just remove the option. knobs are for nobs. releases don't need it either, because we tar everything before building, thus eliminating all build artifacts. we do this on a fresh copy of lbmk on ./mk release Signed-off-by: Leah Rowe <leah@libreboot.org>
-rw-r--r--config/data/coreboot/mkhelper.cfg8
-rwxr-xr-xmk28
2 files changed, 3 insertions, 33 deletions
diff --git a/config/data/coreboot/mkhelper.cfg b/config/data/coreboot/mkhelper.cfg
index 6808f18f..8414ab53 100644
--- a/config/data/coreboot/mkhelper.cfg
+++ b/config/data/coreboot/mkhelper.cfg
@@ -26,11 +26,3 @@ cbfscfg=""
premake="corebootpremake"
mkhelper="coreboot_pad_one_byte"
postmake="mkcorebootbin"
-
-# must confirm, but i think git-clean
-# will also delete crossgcc builds in
-# coreboot.git, which we do not currently
-# rely on out-of-tree
-gitclean="n"
-
-# so, TODO: support out-of-tree xgcc builds
diff --git a/mk b/mk
index 966b52e1..13d623d9 100755
--- a/mk
+++ b/mk
@@ -68,8 +68,6 @@ flag=""
# : means false
if_do_make=""
if_not_do_make=":"
-if_make_clean=":"
-if_not_make_clean=""
if_make_config=":"
if_not_make_config=""
if_build=":" # can be false even if make is true
@@ -85,10 +83,6 @@ eval "`newvar autoconfargs autogenargs badhash badtghash bootstrapargs \
premake project release rev srcdir target target_dir tree xarch xgcctree \
xlang`"
-# can be overridden in project mkhelper.cfg
-gitclean="y"
-gitcleanargs="-fdx"
-
main()
{
flags="f:F:b:m:u:c:x:s:l:n:d:"
@@ -117,8 +111,6 @@ main()
-b) : ;;
-u) mode="oldconfig" ;;
-m) mode="menuconfig" ;;
- -c) mode="clean" ;;
- -x) mode="crossgcc-clean" ;;
-f|-F) # download source code for a project
# macros. colon means false.
if_do_make=":"
@@ -144,11 +136,6 @@ main()
if_not_make_config=":"
fi
- if [ "${mode%clean}" != "$mode" ]; then
- if_make_clean=""
- if_not_make_clean=":"
- fi
-
if [ -z "${OPTARG+x}" ]; then
shift 1
break
@@ -259,11 +246,8 @@ handle_defconfig()
err "$configdir: 'tree' not set" "handle_defconfig" "$@"
srcdir="src/$project/$tree"
- [ ! -d "$srcdir" ] && \
- $if_not_make_clean \
- return 0
- for y in "$target_dir/config"/*
+ [ -d "$srcdir" ] && for y in "$target_dir/config"/*
do
[ ! -f "$y" ] && \
$if_not_dry_build \
@@ -296,7 +280,6 @@ configure_project()
eval "`newvar autoconfargs badhash badtghash bootstrapargs \
build_depend buildtype cleanargs makeargs mkhelper postmake \
premake release xarch xgcctree xlang`"
- gitclean="y"
[ ! -f "$_tcfg" ] && \
buildtype="auto"
@@ -516,7 +499,7 @@ handle_makefile()
{
if $if_not_dry_build check_makefile "$srcdir"; then
$if_not_dry_build \
- x_ make -C "$srcdir" $cleanargs clean
+ x_ make -C "$srcdir" clean $cleanargs
fi
[ -f "$defconfig" ] && \
@@ -533,11 +516,6 @@ handle_makefile()
$if_make_config \
$if_not_dry_build \
x_ cp "$srcdir/$_copy" "$defconfig"; :
-
- [ -e "$srcdir/.git" ] && [ "$gitclean" = "y" ] && \
- $if_make_clean \
- $if_not_dry_build \
- x_ git -C "$srcdir" clean $gitcleanargs; :
}
run_make_command()
@@ -615,7 +593,7 @@ copy_elf()
"cannot read '$listfile'" "copy_elf" "$@"; :
fi
- ( x_ make clean -C "$srcdir" $cleanargs ) || \
+ ( x_ make -C "$srcdir" clean $cleanargs ) || \
err "can't make-clean '$srcdir'" "copy_elf" "$@"; :
}