summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-09-09 21:31:01 (EDT)
committer P. J. McDermott <pjm@nac.net>2012-09-09 21:31:01 (EDT)
commit2941acbc9917d0184d8f28f8a12beef2b82775fb (patch)
treed88bf609ddeb139d27afafcc4b1c6d86ee61f1cb
parent2e958369656a85519caed812c2428e044c341b52 (diff)
Build reduced dependency list in ob_reduce_deps.
NB: This doesn't yet work.
-rw-r--r--lib/deps.sh23
1 files changed, 20 insertions, 3 deletions
diff --git a/lib/deps.sh b/lib/deps.sh
index 0e23c94..5637297 100644
--- a/lib/deps.sh
+++ b/lib/deps.sh
@@ -116,7 +116,8 @@ ob_parse_dep()
ob_reduce_deps()
{
_ob_local _obrd_opt _obrd_host_arch _obrd_deps \
- _obrd_orig_ifs _obrd_dep_and _obrd_dep_or
+ _obrd_orig_ifs _obrd_dep_and _obrd_dep_or \
+ _obrd_dep_list _obrd_dep_or_list _obrd_dep
_obrd_union=false
@@ -148,14 +149,30 @@ ob_reduce_deps()
for _obrd_dep_and in ${_obrd_deps}; do
if ! ${_obrd_union}; then
IFS='| '
- for _obrd_dep_or in ${_obrd_deps}; do
- :
+ _obrd_dep_or_list=
+ for _obrd_dep_or in ${_obrd_dep_and}; do
+ _obrd_dep="$(ob_parse_dep -a "${_obrd_host_arch}" \
+ "${_obrd_dep_or}")"
+ if [ -n "${_obrd_dep}" ]; then
+ if [ -n "${_obrd_dep_or_list}" ]; then
+ _obrd_dep_or_list="${_obrd_dep_or_list}| "
+ fi
+ _obrd_dep_or_list="${_obrd_dep_or_list}${_obrd_dep}"
+ fi
done
+ if [ -n "${_obrd_dep_or_list}" ]; then
+ if [ -n "${_obrd_dep_list}" ]; then
+ _obrd_dep_list="${_obrd_dep_list}, "
+ fi
+ _obrd_dep_list="${_obrd_dep_list}${_obrd_dep_or_list}"
+ fi
else
:
fi
done
+ echo "${_obrd_dep_list}"
+
_ob_return 0
return ${?}
}