From d4ef2a660a18544a7aa4fea90120cb4eceb38a10 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Thu, 08 Nov 2012 01:04:45 -0500 Subject: Lightly refactor oh_buildsystem_do(), add warning. --- (limited to 'lib') diff --git a/lib/buildsystem.sh b/lib/buildsystem.sh index 11d581b..5c9579a 100644 --- a/lib/buildsystem.sh +++ b/lib/buildsystem.sh @@ -81,7 +81,7 @@ oh_set_buildsystem_option() oh_buildsystem_do() { - _oh_local _ohbsd_step _ohbsd_bs _ohbsd_done + _oh_local _ohbsd_step _ohbsd_bs if [ ${#} -ge 1 ]; then _ohbsd_step="${1}" @@ -91,26 +91,25 @@ oh_buildsystem_do() return ${?} fi - _ohbsd_done='false' - if [ -n "${_OH_BUILDSYSTEM_SYSTEM}" ]; then if "_oh_${_OH_BUILDSYSTEM_SYSTEM}_can_${_ohbsd_step}"; then "_oh_${_OH_BUILDSYSTEM_SYSTEM}_${_ohbsd_step}" "${@}" - _ohbsd_done='true' + _oh_return ${?} + return ${?} fi else for _ohbsd_bs in ${_OH_BUILDSYSTEMS}; do if "_oh_${_ohbsd_bs}_can_${_ohbsd_step}"; then "_oh_${_ohbsd_bs}_${_ohbsd_step}" "${@}" - _ohbsd_done='true' - break + _oh_return ${?} + return ${?} fi done fi - if ! ${_ohbsd_done}; then - : error - fi + ob_warn "$(ob_get_msg 'no_capable_build_sys')" + _oh_return 1 + return ${?} } oh_buildsystem_arch() -- cgit v0.9.1