summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz <lucio@lucioillanes.de>2021-04-06 16:13:44 +0100
committerLucio Andrés Illanes Albornoz <lucio@lucioillanes.de>2021-04-06 16:13:44 +0100
commit1dd016f3150117f7d7406e20c5ebb48eb406c2da (patch)
tree804231d187daad89d405a0b5b0b4090ce5b044ab
parent50ba387292db4941fe2987606374791e724fbd17 (diff)
downloadmidipix_build-1dd016f3150117f7d7406e20c5ebb48eb406c2da.tar.bz2
midipix_build-1dd016f3150117f7d7406e20c5ebb48eb406c2da.tar.xz
subr/build_init.subr:buildp_init_args(): check both automatic as well as non-automatic build groups.
subr/ex_pkg.subr(:ex_pkg_load_vars(): return both automatic as well as non-automatic build groups.
-rw-r--r--subr/build_init.subr17
-rw-r--r--subr/ex_pkg.subr7
2 files changed, 18 insertions, 6 deletions
diff --git a/subr/build_init.subr b/subr/build_init.subr
index 9e765275..d3e4ce19 100644
--- a/subr/build_init.subr
+++ b/subr/build_init.subr
@@ -3,7 +3,9 @@
#
buildp_init_args() {
- local _group="" _last_pkg="" _pkg_names_unknown="" _rc=0; _status="";
+ local _foundfl=0 _group="" _last_pkg="" _pkg_names_unknown="" _rc=0\
+ EX_PKG_BUILD_GROUPS EX_PKG_BUILD_GROUPS_NOAUTO; _status="";
+
if [ -z "${BUILD_HNAME:-}" ]\
&& ! BUILD_HNAME="$(hostname)"; then
_rc=1; _status="Error: failed to obtain hostname.";
@@ -51,11 +53,18 @@ buildp_init_args() {
fi;
if [ -z "${BUILD_GROUPS}" ]; then
BUILD_GROUPS="${EX_PKG_BUILD_GROUPS}";
- else for _group in ${BUILD_GROUPS}; do
- if ! rtl_lmatch "${EX_PKG_BUILD_GROUPS}" "${_group}"; then
- _rc=1; _status="Error: unknown build group \`${_group}'."; break;
+ else _foundfl=0; for _group in ${BUILD_GROUPS}; do
+ if rtl_lmatch "${EX_PKG_BUILD_GROUPS}" "${_group}"; then
+ _foundfl=1; break;
fi;
done;
+ if [ "${_foundfl}" -eq 0 ]; then
+ _foundfl=0; for _group in ${BUILD_GROUPS}; do
+ if rtl_lmatch "${EX_PKG_BUILD_GROUPS}" "${_group}"; then
+ _rc=1; _status="Error: unknown build group \`${_group}'."; break;
+ fi;
+ done;
+ fi;
fi;
if [ "${_rc:-0}" -eq 0 ]; then
if [ -n "${ARG_DIST}" ]; then
diff --git a/subr/ex_pkg.subr b/subr/ex_pkg.subr
index e07d4dac..c1140d4a 100644
--- a/subr/ex_pkg.subr
+++ b/subr/ex_pkg.subr
@@ -133,10 +133,10 @@ ex_pkg_load_vars() {
#
# ex_pkg_load_groups() - load all available build groups
#
-# Return: zero (0) on success, non-zero (>0) on failure, build groups loaded and ${EX_PKG_BUILD_GROUPS} set post-return.
+# Return: zero (0) on success, non-zero (>0) on failure, build groups loaded and ${EX_PKG_BUILD_GROUPS} and ${EX_PKG_BUILD_GROUPS_NOAUTO} set post-return.
#
ex_pkg_load_groups() {
- local _build_groups="" _fname="" _group="" _groups="";
+ local _build_groups="" _build_groups_noauto="" _fname="" _group="" _groups="";
for _fname in $(find ./groups -name *.group | sort); do
rtl_fileop source_opt "${_fname}";
if [ -n "${GROUP_TARGET:-}" ]; then
@@ -149,6 +149,8 @@ ex_pkg_load_groups() {
if [ -n "${GROUP_AUTO:-}" ]; then
if [ "${GROUP_AUTO:-0}" -ne 0 ]; then
_build_groups="$(rtl_lconcat "${_build_groups}" "${_group}")";
+ else
+ _build_groups_noauto="$(rtl_lconcat "${_build_groups_noauto}" "${_group}")";
fi;
unset GROUP_AUTO;
else
@@ -157,6 +159,7 @@ ex_pkg_load_groups() {
fi;
done;
EX_PKG_BUILD_GROUPS="$(rtl_uniq "${_build_groups}")";
+ EX_PKG_BUILD_GROUPS_NOAUTO="$(rtl_uniq "${_build_groups_noauto}")";
};
#