summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2024-07-13 23:07:45 +0100
committerLeah Rowe <leah@libreboot.org>2024-07-13 23:07:45 +0100
commit373c2eb23dfed9ca0cef80321e7d57ddaf550d35 (patch)
treeca80b0212c68708f1e307f1bcb48228b5e9f2db9
parent12c3956f5986645afd17e2b72bfdae9771c89240 (diff)
trees: move dependency building to new function
configure_project is a bit big. move the dependencies build logic to a new function. it may be desirable in future to make the way that function works the way all build commands are done. for example: ./update trees -b coreboot x230_12mb would become: ./update trees -b coreboot/x230_12mb this would enable to mix and match multi/single tree projects. for now, leave things as they are. Signed-off-by: Leah Rowe <leah@libreboot.org>
-rwxr-xr-xscript/trees21
1 files changed, 12 insertions, 9 deletions
diff --git a/script/trees b/script/trees
index a260cf24..db5f52b6 100755
--- a/script/trees
+++ b/script/trees
@@ -139,21 +139,24 @@ configure_project()
[ "$XBMK_RELEASE" = "y" ] && [ "$release" = "n" ] && return 1
[ -z "$btype" ] || [ "${mode%config}" = "$mode" ] || return 1
- if [ -z "$mode" ]; then
- for bd in $build_depend; do
- bd_p="${bd%%/*}"; bd_t="${bd##*/}"
- [ -z "$bd_p" ] && $dry $err "$project/$tree: !bd '$bd'"
- [ "${bd##*/}" = "$bd" ] && bd_t=""
- [ -z "$bd_p" ] || $dry ./update trees -b $bd_p $bd_t \
- || $err "!mk $project/$tree $bd_p/$bd_t"
- done
- fi
+ [ -z "$mode" ] && build_dependencies
[ "$mode" = "fetch" ] || x_ ./update trees -f "$project" $target
[ "$mode" = "fetch" ] || return 0
[ -f "CHANGELOG" ] && return 1; fetch_${cmd#build_}; return 1
}
+build_dependencies()
+{
+ for bd in $build_depend; do
+ bd_p="${bd%%/*}"; bd_t="${bd##*/}"
+ [ -z "$bd_p" ] && $dry $err "$project/$tree: !bd '$bd'"
+ [ "${bd##*/}" = "$bd" ] && bd_t=""
+ [ -z "$bd_p" ] || $dry ./update trees -b $bd_p $bd_t \
+ || $err "!mk $project/$tree $bd_p/$bd_t"; continue
+ done; return 0
+}
+
check_cross_compiler()
{
for _xarch in $xarch; do