From 8d1159dbe468fb0f5f47fa7c388dbf1745cfad80 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Mon, 20 Jan 2014 15:32:14 -0500 Subject: lib/buildsystem/*.sh: Remove _oh_local. --- diff --git a/lib/buildsystem/autoconf.sh b/lib/buildsystem/autoconf.sh index cc727e7..35ae452 100644 --- a/lib/buildsystem/autoconf.sh +++ b/lib/buildsystem/autoconf.sh @@ -27,52 +27,53 @@ _oh_autoconf_can_configure() _oh_autoconf_configure() { - _oh_local _ohbsbac_arch_opts _ohbsbac_libdir _ohbsbac_rc + local arch_opts= + local libdir= + local rc= mkdir -p "${_OH_BUILDSYSTEM_BUILD_DIR}" cd "${_OH_BUILDSYSTEM_BUILD_DIR}" - _ohbsbac_arch_opts=" + arch_opts=" --build=$(oh_buildsystem_arch "${OPK_BUILD_ARCH}" 'autoconf') " if [ "${OPK_BUILD_ARCH}" != "${OPK_HOST_ARCH}" ]; then - _ohbsbac_arch_opts="${_ohbsbac_arch_opts} + arch_opts="${arch_opts} --host=$(oh_buildsystem_arch \ "${OPK_HOST_ARCH}" 'autoconf')" fi if [ -n "${_OH_BUILDSYSTEM_TARGET_ARCH}" ]; then - _ohbsbac_arch_opts="${_ohbsbac_arch_opts} + arch_opts="${arch_opts} --target=$(oh_buildsystem_arch \ "${_OH_BUILDSYSTEM_TARGET_ARCH}" 'autoconf')" fi if [ '@@MULTIARCH_LIBDIR@@' = 'true' ]; then - _ohbsbac_libdir='${prefix}/lib/'"${OPK_HOST_ARCH}" + libdir='${prefix}/lib/'"${OPK_HOST_ARCH}" else - _ohbsbac_libdir='${prefix}/lib/' + libdir='${prefix}/lib/' fi "${_OH_BUILDSYSTEM_SOURCE_DIR}/configure" \ --prefix='/usr' \ --bindir='${prefix}/bin' \ --sbindir='${prefix}/sbin' \ - --libexecdir="${_ohbsbac_libdir}" \ + --libexecdir="${libdir}" \ --sysconfdir='/etc' \ --localstatedir='/var' \ - --libdir="${_ohbsbac_libdir}" \ + --libdir="${libdir}" \ --includedir='${prefix}/include' \ --infodir='${prefix}/share/info' \ --mandir='${prefix}/share/man' \ - ${_ohbsbac_arch_opts} \ + ${arch_opts} \ --disable-maintainer-mode \ --disable-dependency-tracking \ "${@}" - _ohbsbac_rc=${?} + rc=${?} cd "${_OH_BUILDSYSTEM_WORK_AREA}" - _oh_return ${_ohbsbac_rc} - return ${?} + return ${rc} } _oh_autoconf_can_build() 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 ${?} } 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} } -- cgit v0.9.1