summaryrefslogtreecommitdiffhomepage
path: root/subr
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz <lucio@lucioillanes.de>2020-02-11 21:05:04 +0000
committerLucio Andrés Illanes Albornoz <lucio@lucioillanes.de>2020-02-11 21:05:04 +0000
commit9225a6636994b4edfb671bf12dd70480d0e4b013 (patch)
tree17483c54e7a50f96b54c63c55093d6c6698132de /subr
parent4df7709a2edf9c2ad4c657ff25a3766cc6e9aa54 (diff)
downloadmidipix_build-9225a6636994b4edfb671bf12dd70480d0e4b013.tar.bz2
midipix_build-9225a6636994b4edfb671bf12dd70480d0e4b013.tar.xz
vars/build.vars:{host_toolchain,invariants,native_{runtime,tools,toolchain_mingw32}}: adds dependencies.
vars/build.vars:native_toolchain: merges native_toolchain_deps, adds dependencies. vars/build.vars:{bzip2,expat,gdb,python2}: moved into native_toolchain, adds dependencies. vars/build.vars:native_packages_deps{,_{deps,x11}}:${PKG_IN_TREE}: set. vars/env.vars:${DEFAULT_BUILD_VARS}: adds IN_TREE. vars/gcc.vars: continuously echo build status messages to pipe fd #3. etc/build.usage: updated. subr/ex_pkg_dispatch.subr: enforce in-order building given ${PKG_IN_TREE} set on group.
Diffstat (limited to 'subr')
-rw-r--r--subr/ex_pkg_dispatch.subr21
1 files changed, 12 insertions, 9 deletions
diff --git a/subr/ex_pkg_dispatch.subr b/subr/ex_pkg_dispatch.subr
index cf92d8c5..255264fe 100644
--- a/subr/ex_pkg_dispatch.subr
+++ b/subr/ex_pkg_dispatch.subr
@@ -7,8 +7,9 @@
#
exp_pkg_check_depends() {
- local _pkg_depends="${1}" _pkg_name="${2}" _dependfl=0;
- if [ -z "${_restart}" ]; then
+ local _group_name="${1}" _pkg_depends="${2}" _pkg_name="${3}" _dependfl=0;
+ if [ -z "${_restart}" ]\
+ || ! [ "$(ex_rtl_get_var_unsafe "$(ex_rtl_toupper "${_group_name}")_IN_TREE"))" = "1" ]; then
for _pkg_name_depend in ${_pkg_depends}; do
if [ -n "$(ex_rtl_lsearch "${_pkgs_wait}" "${_pkg_name_depend}")" ]\
|| [ -z "$(ex_rtl_lsearch "${_pkgs_complete}" "${_pkg_name_depend}")" ]; then
@@ -23,12 +24,12 @@ exp_pkg_dispatch_group() {
local _njob=0 _pkg_depends="" _pkg_name="";
for _njob in $(seq 1 $((${_njobs_max}-${_njobs}))); do
for _pkg_name in ${_pkg_names}; do
- if [ -z "$(ex_rtl_lsearch "${_pkgs_complete}" "${_pkg_name}")" ] \
- && [ -z "$(ex_rtl_lsearch "${_pkgs_wait}" "${_pkg_name}")" ] \
+ if [ -z "$(ex_rtl_lsearch "${_pkgs_complete}" "${_pkg_name}")" ]\
+ && [ -z "$(ex_rtl_lsearch "${_pkgs_wait}" "${_pkg_name}")" ]\
&& _pkg_depends="$(exp_pkg_expand_packages $(ex_rtl_get_var_unsafe "PKG_$(ex_rtl_toupper "${_pkg_name}")_DEPENDS"))"\
- && exp_pkg_check_depends "${_pkg_depends}" "${_pkg_name}" \
- && exp_pkg_dispatch_package "${_dispatch_fn}" "${_group_name}" \
- "${_pkg_name}" "${_restart_at}" "${_stderrout_path}" \
+ && exp_pkg_check_depends "${_group_name}" "${_pkg_depends}" "${_pkg_name}" \
+ && exp_pkg_dispatch_package "${_dispatch_fn}" "${_group_name}" \
+ "${_pkg_name}" "${_restart_at}" "${_stderrout_path}" \
"${_pipe_path}"; then
_pkgs_found_new="${_pkgs_found_new:+${_pkgs_found_new} }${_pkg_name}";
break;
@@ -85,7 +86,8 @@ exp_pkg_get_packages() {
&& ! ex_rtl_lmatch "ALL LAST" " " "${_restart}"; then
_pkg_names="$(ex_rtl_lsearch "${_pkg_names}" "${_restart}")";
fi;
- if [ -z "${_restart}" ]; then
+ if [ -z "${_restart}" ]\
+ || ! [ "$(ex_rtl_get_var_unsafe "${_group_name_uc}"_IN_TREE)" = "1" ]; then
_pkg_names="$(ex_rtl_uniq $(exp_pkg_expand_packages ${_pkg_names}))";
fi;
};
@@ -98,7 +100,8 @@ ex_pkg_dispatch() {
"${_dispatch_fn}" start_group "${_group_name}" ""; ex_rtl_fileop mkdir "${BUILD_WORKDIR}";
if exp_pkg_get_packages "${_dispatch_fn}" "${_group_name}" "${_restart}"\
&& [ -n "${_pkg_names}" ]; then
- if [ "${ARG_PARALLEL:-0}" -gt 1 ]; then
+ if [ "${ARG_PARALLEL:-0}" -gt 1 ]\
+ && ! [ "$(ex_rtl_get_var_unsafe "$(ex_rtl_toupper "${_group_name}")"_IN_TREE)" = 1 ]; then
_njobs_max="${DEFAULT_BUILD_CPUS}";
fi;
ex_rtl_fileop mkfifo "${_pipe_path}"; exp_pkg_dispatch_group;