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
19
script/trees
19
script/trees
|
@ -139,19 +139,22 @@ configure_project()
|
||||||
[ "$XBMK_RELEASE" = "y" ] && [ "$release" = "n" ] && return 1
|
[ "$XBMK_RELEASE" = "y" ] && [ "$release" = "n" ] && return 1
|
||||||
[ -z "$btype" ] || [ "${mode%config}" = "$mode" ] || return 1
|
[ -z "$btype" ] || [ "${mode%config}" = "$mode" ] || return 1
|
||||||
|
|
||||||
if [ -z "$mode" ]; then
|
[ -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
|
for bd in $build_depend; do
|
||||||
bd_p="${bd%%/*}"; bd_t="${bd##*/}"
|
bd_p="${bd%%/*}"; bd_t="${bd##*/}"
|
||||||
[ -z "$bd_p" ] && $dry $err "$project/$tree: !bd '$bd'"
|
[ -z "$bd_p" ] && $dry $err "$project/$tree: !bd '$bd'"
|
||||||
[ "${bd##*/}" = "$bd" ] && bd_t=""
|
[ "${bd##*/}" = "$bd" ] && bd_t=""
|
||||||
[ -z "$bd_p" ] || $dry ./update trees -b $bd_p $bd_t \
|
[ -z "$bd_p" ] || $dry ./update trees -b $bd_p $bd_t \
|
||||||
|| $err "!mk $project/$tree $bd_p/$bd_t"
|
|| $err "!mk $project/$tree $bd_p/$bd_t"; continue
|
||||||
done
|
done; return 0
|
||||||
fi
|
|
||||||
|
|
||||||
[ "$mode" = "fetch" ] || x_ ./update trees -f "$project" $target
|
|
||||||
[ "$mode" = "fetch" ] || return 0
|
|
||||||
[ -f "CHANGELOG" ] && return 1; fetch_${cmd#build_}; return 1
|
|
||||||
}
|
}
|
||||||
|
|
||||||
check_cross_compiler()
|
check_cross_compiler()
|
||||||
|
|
Loading…
Reference in New Issue