From 2941acbc9917d0184d8f28f8a12beef2b82775fb Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sun, 09 Sep 2012 21:31:01 -0400 Subject: Build reduced dependency list in ob_reduce_deps. NB: This doesn't yet work. --- (limited to 'lib') 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 ${?} } -- cgit v0.9.1