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>audit6
parent
12c3956f59
commit
373c2eb23d
21
script/trees
21
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
|
||||
|
|
Loading…
Reference in New Issue