summaryrefslogtreecommitdiffstats
path: root/lib/buildsystem/make.sh
diff options
context:
space:
mode:
Diffstat (limited to 'lib/buildsystem/make.sh')
-rw-r--r--lib/buildsystem/make.sh23
1 files changed, 12 insertions, 11 deletions
diff --git a/lib/buildsystem/make.sh b/lib/buildsystem/make.sh
index 66cd20b..ef34e16 100644
--- a/lib/buildsystem/make.sh
+++ b/lib/buildsystem/make.sh
@@ -83,9 +83,11 @@ _oh_make_install()
_oh_make_update_first_defined_target()
{
- _oh_local _ohbsmufdt_targets _ohbsmufdt_target _ohbsmufdt_rc
+ local targets=
+ local target=
+ local rc=
- _ohbsmufdt_targets="${1}"
+ targets="${1}"
shift
mkdir -p "${_OH_BUILDSYSTEM_BUILD_DIR}"
@@ -93,24 +95,23 @@ _oh_make_update_first_defined_target()
if [ -n "${_OH_BUILDSYSTEM_BUILD_TARGET}" ]; then
make "${@}" "${_OH_BUILDSYSTEM_BUILD_TARGET}"
- _ohbsmufdt_rc=${?}
- elif [ -n "${_ohbsmufdt_targets}" ]; then
- for _ohbsmufdt_target in ${_ohbsmufdt_targets}; do
+ rc=${?}
+ elif [ -n "${targets}" ]; then
+ for target in ${targets}; do
# If the target is defined, ...
- if make -n "${_ohbsmufdt_target}" >/dev/null 2>&1; then
+ if make -n "${target}" >/dev/null 2>&1; then
# ... then update it.
- make "${@}" "${_ohbsmufdt_target}"
- _ohbsmufdt_rc=${?}
+ make "${@}" "${target}"
+ rc=${?}
break
fi
done
else
make "${@}"
- _ohbsmufdt_rc=${?}
+ rc=${?}
fi
cd "${_OH_BUILDSYSTEM_WORK_AREA}"
- _oh_return ${_ohbsmufdt_rc}
- return ${?}
+ return ${rc}
}