diff options
Diffstat (limited to 'lib/buildsystem/kbuild.sh')
-rw-r--r-- | lib/buildsystem/kbuild.sh | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/lib/buildsystem/kbuild.sh b/lib/buildsystem/kbuild.sh index a5f148f..881013e 100644 --- a/lib/buildsystem/kbuild.sh +++ b/lib/buildsystem/kbuild.sh @@ -70,53 +70,52 @@ _oh_kbuild_install() _oh_kbuild_update_target() { - _oh_local _ohbskut_target _ohbskut_arch _ohbskut_rc + local target= + local arch= + local rc= - _ohbskut_target="${1}" + target="${1}" shift - if ! _ohbskut_arch="$(oh_buildsystem_arch "${OPK_HOST_ARCH}" 'kbuild')" + if ! arch="$(oh_buildsystem_arch "${OPK_HOST_ARCH}" 'kbuild')" then - _oh_return 1 - return ${?} + return 1 fi mkdir -p "${_OH_BUILDSYSTEM_BUILD_DIR}" cd "${_OH_BUILDSYSTEM_BUILD_DIR}" if [ -n "${_OH_BUILDSYSTEM_BUILD_TARGET}" ]; then - make ARCH="${_ohbskut_arch}" CROSS_COMPILE="${OPK_TOOL_PREFIX}" \ + make ARCH="${arch}" CROSS_COMPILE="${OPK_TOOL_PREFIX}" \ "${@}" "${_OH_BUILDSYSTEM_BUILD_TARGET}" - _ohbskut_rc=${?} - elif [ -n "${_ohbskut_target}" ]; then - make ARCH="${_ohbskut_arch}" CROSS_COMPILE="${OPK_TOOL_PREFIX}" \ - "${@}" "${_ohbskut_target}" - _ohbskut_rc=${?} + rc=${?} + elif [ -n "${target}" ]; then + make ARCH="${arch}" CROSS_COMPILE="${OPK_TOOL_PREFIX}" \ + "${@}" "${target}" + rc=${?} else - make ARCH="${_ohbskut_arch}" CROSS_COMPILE="${OPK_TOOL_PREFIX}" \ + make ARCH="${arch}" CROSS_COMPILE="${OPK_TOOL_PREFIX}" \ "${@}" - _ohbskut_rc=${?} + rc=${?} fi cd "${_OH_BUILDSYSTEM_WORK_AREA}" - _oh_return ${_ohbskut_rc} - return ${?} + return ${rc} } _oh_kbuild_testarch() { - _oh_local _ohbskta_arch + local arch= - _ohbskta_arch="${1}" + arch="${1}" mkdir -p "${_OH_BUILDSYSTEM_BUILD_DIR}" cd "${_OH_BUILDSYSTEM_BUILD_DIR}" - make -n ARCH="${_ohbskta_arch}" help >/dev/null 2>&1 + make -n ARCH="${arch}" help >/dev/null 2>&1 cd "${_OH_BUILDSYSTEM_WORK_AREA}" - _oh_return ${?} return ${?} } |