summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-09-14 11:03:04 +0100
committerLeah Rowe <leah@libreboot.org>2026-09-14 11:07:24 +0100
commitabee462f2a9ad766c6bd62be29ff194587aa1394 (patch)
treed290c3248c1548a3cc91c9ac46f0acd4772ffd2d
parentcb49e7794793eaec97794afea21795a45cb01df5 (diff)
mk: run xbmk_init here, not from init.sh
it should be clear on first reading, what the actual control flow is. hiding the call in init.sh obscures first reading. now it is absolutely clear on first reading, that xbmk_init is called before going through everything else in mk. Signed-off-by: Leah Rowe <leah@libreboot.org>
-rw-r--r--include/env/init.sh2
-rwxr-xr-xmk3
2 files changed, 3 insertions, 2 deletions
diff --git a/include/env/init.sh b/include/env/init.sh
index 0003d098..23850c12 100644
--- a/include/env/init.sh
+++ b/include/env/init.sh
@@ -391,5 +391,3 @@ xchild()
exit $xbmk_rval
}
-
-xbmk_init "$@"
diff --git a/mk b/mk
index 01d6f359..d061aec7 100755
--- a/mk
+++ b/mk
@@ -27,6 +27,8 @@ cd "${commandv%/*}" || exit 1
. "include/lib.sh"
. "include/env/init.sh"
+xbmk_init "$@"
+
. "include/env/get.sh"
. "include/fw/vendor.sh"
@@ -433,6 +435,7 @@ check_cross_compiler()
[ -f "$xgccfile" ] && \
return 0 # build exists already, so skip building
+ # it sometimes fails for like, no reason
make -C "$cbdir" $xgccargs || x_ make -C "$cbdir" $xgccargs
x_ touch "$xgccfile" # prevent unnecessary re-build operations