diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/buildsystem/make.sh | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/lib/buildsystem/make.sh b/lib/buildsystem/make.sh index f041e50..2010bed 100644 --- a/lib/buildsystem/make.sh +++ b/lib/buildsystem/make.sh @@ -33,12 +33,7 @@ _oh_make_can_build() _oh_make_build() { - if [ -n "${_OH_BUILDSYSTEM_BUILD_TARGET}" ]; then - _oh_make_update_first_defined_target "${_OH_BUILDSYSTEM_BUILD_TARGET}" \ - "${@}" - else - _oh_make_update_first_defined_target '' "${@}" - fi + _oh_make_update_first_defined_target '' "${@}" } _oh_make_can_clean() @@ -68,13 +63,8 @@ _oh_make_can_install() _oh_make_install() { - if [ -n "${_OH_BUILDSYSTEM_BUILD_TARGET}" ]; then - _oh_make_update_first_defined_target "${_OH_BUILDSYSTEM_BUILD_TARGET}" \ - "${@}" "DESTDIR=${_OH_BUILDSYSTEM_DESTDIR}" - else - _oh_make_update_first_defined_target 'install' \ - "${@}" "DESTDIR=${_OH_BUILDSYSTEM_DESTDIR}" - fi + _oh_make_update_first_defined_target 'install' \ + "${@}" "DESTDIR=${_OH_BUILDSYSTEM_DESTDIR}" } _oh_make_update_first_defined_target() @@ -87,10 +77,10 @@ _oh_make_update_first_defined_target() mkdir -p "${_OH_BUILDSYSTEM_BUILD_DIR}" cd "${_OH_BUILDSYSTEM_BUILD_DIR}" - if [ -z "${_ohbsmufdt_targets}" ]; then - make "${@}" + if [ -n "${_OH_BUILDSYSTEM_BUILD_TARGET}" ]; then + make "${@}" "${_OH_BUILDSYSTEM_BUILD_TARGET}" _ohbsmufdt_rc=${?} - else + elif [ -n "${_ohbsmufdt_targets}" ]; then for _ohbsmufdt_target in ${_ohbsmufdt_targets}; do # If the target is defined, ... if make -n "${_ohbsmufdt_target}" >/dev/null 2>&1; then @@ -100,6 +90,9 @@ _oh_make_update_first_defined_target() break fi done + else + make "${@}" + _ohbsmufdt_rc=${?} fi cd "${_OH_BUILDSYSTEM_WORK_AREA}" |