diff options
author | Lucio Andrés Illanes Albornoz (arab, vxp) <lucio@lucioillanes.de> | 2017-12-05 20:35:00 +0000 |
---|---|---|
committer | Lucio Andrés Illanes Albornoz (arab, vxp) <lucio@lucioillanes.de> | 2017-12-05 21:19:54 +0000 |
commit | cbc8e0b7ea70c0e118b51ac479a08eb95a9779ca (patch) | |
tree | 5be55d5e84897fa2ee125ac4a79ad0b9ef1f5956 /subr/ex_pkg_dispatch.subr | |
parent | 1156ecbcde96c6189eac17d8c4bf953b4528ed36 (diff) | |
download | midipix_build-cbc8e0b7ea70c0e118b51ac479a08eb95a9779ca.tar.bz2 midipix_build-cbc8e0b7ea70c0e118b51ac479a08eb95a9779ca.tar.xz |
etc/build.usage: adds -P [jobs].
subr/build_args.subr: adds `optarg' arg type & ARG_PARALLEL:optarg:-P:auto.
subr/build_init.subr: default ${ARG_PARALLEL} ([jobs]) to ${DEFAULT_BUILD_CPUS}.
subr/ex_pkg_dispatch.subr: honour ${ARG_PARALLEL}, defaulting to no parallelisation.
Diffstat (limited to 'subr/ex_pkg_dispatch.subr')
-rw-r--r-- | subr/ex_pkg_dispatch.subr | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/subr/ex_pkg_dispatch.subr b/subr/ex_pkg_dispatch.subr index f56146bf..92890ba6 100644 --- a/subr/ex_pkg_dispatch.subr +++ b/subr/ex_pkg_dispatch.subr @@ -46,7 +46,8 @@ ex_pkg_dispatch() { && [ "${_restart}" != ALL ]; then _pkg_names="$(ex_rtl_lfilter "${_pkg_names}" "${_restart}")"; fi; - if [ "$(ex_rtl_get_var_unsafe ${_tgt_name_uc}_PARALLELISE)" = 1 ]; then + if [ "$(ex_rtl_get_var_unsafe ${_tgt_name_uc}_PARALLELISE)" = 1 ]\ + && [ "${ARG_PARALLEL:-0}" -gt 1 ]; then _njobs_max="${DEFAULT_BUILD_CPUS}"; else _njobs_max=1; |