From 7fe25dbd38d2c08abdef9db1ec9cb61122b54da5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz=20=28arab=2C=20vx?= =?UTF-8?q?p=29?= Date: Fri, 3 Feb 2017 04:25:20 +0100 Subject: build.sh, subr/pkg_setup_env.subr: renamed build step `setup' to `setup_env.' --- build.sh | 2 +- subr/pkg_setup.subr | 36 ------------------------------------ subr/pkg_setup_env.subr | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+), 37 deletions(-) delete mode 100644 subr/pkg_setup.subr create mode 100644 subr/pkg_setup_env.subr diff --git a/build.sh b/build.sh index fe13c91e..8992c5aa 100755 --- a/build.sh +++ b/build.sh @@ -213,7 +213,7 @@ for BUILD_TARGET_LC in $(bp_subst_tgts ${BUILD_TARGETS_META}); do done; parse_with_pkg_name ${BUILD_PACKAGE_LC%.*}; for __ in all disabled fetch extract build_dir patch_pre autoconf patch \ - setup distclean configure clean build install; do + setup_env distclean configure clean build install; do case ${__} in all) if test_cmd pkg_${PKG_NAME}_all; then diff --git a/subr/pkg_setup.subr b/subr/pkg_setup.subr deleted file mode 100644 index 0ee60bb7..00000000 --- a/subr/pkg_setup.subr +++ /dev/null @@ -1,36 +0,0 @@ -# -# . ./build.vars and set -o errexit -o noglob are assumed. -# See warning at the top of build.vars. -# - -pkg_setup() { - PKG_SUBDIR_PATH=${PWD}/${PKG_SUBDIR#/}; - if [ -z "${PKG_CONFIGURE}" ]; then - PKG_CONFIGURE=${PKG_SUBDIR_PATH}/configure; - else - PKG_CONFIGURE=${PWD}/${PKG_CONFIGURE#/}; - fi; - if [ "${PKG_BUILD_TYPE}" = "host" ]; then - export AR=ar; - export CC=gcc; - export CXX=g++; - export RANLIB=ranlib; - else - export AR=${PKG_TARGET}-ar; - export CC=${PKG_TARGET}-gcc; - export CXX=${PKG_TARGET}-g++; - export RANLIB=${PKG_TARGET}-ranlib; - fi; - if [ -x ${PKG_CONFIGURE} ]; then - export CFLAGS_FOR_BUILD="${HOST_TOOLCHAIN_CFLAGS_CONFIGURE_DEFAULT}"; - else - __no_autoconf=1; - fi; - if [ "${PKG_SLIBTOOL}" != "default" ]; then - export MAKE="make LIBTOOL=${PKG_SLIBTOOL:-slibtool}"; - fi; - cd ${PKG_BUILD_DIR}; - set_build_script_done setup distclean -configure; -}; - -# vim:filetype=sh diff --git a/subr/pkg_setup_env.subr b/subr/pkg_setup_env.subr new file mode 100644 index 00000000..de304328 --- /dev/null +++ b/subr/pkg_setup_env.subr @@ -0,0 +1,36 @@ +# +# . ./build.vars and set -o errexit -o noglob are assumed. +# See warning at the top of build.vars. +# + +pkg_setup_env() { + PKG_SUBDIR_PATH=${PWD}/${PKG_SUBDIR#/}; + if [ -z "${PKG_CONFIGURE}" ]; then + PKG_CONFIGURE=${PKG_SUBDIR_PATH}/configure; + else + PKG_CONFIGURE=${PWD}/${PKG_CONFIGURE#/}; + fi; + if [ "${PKG_BUILD_TYPE}" = "host" ]; then + export AR=ar; + export CC=gcc; + export CXX=g++; + export RANLIB=ranlib; + else + export AR=${PKG_TARGET}-ar; + export CC=${PKG_TARGET}-gcc; + export CXX=${PKG_TARGET}-g++; + export RANLIB=${PKG_TARGET}-ranlib; + fi; + if [ -x ${PKG_CONFIGURE} ]; then + export CFLAGS_FOR_BUILD="${HOST_TOOLCHAIN_CFLAGS_CONFIGURE_DEFAULT}"; + else + __no_autoconf=1; + fi; + if [ "${PKG_SLIBTOOL}" != "default" ]; then + export MAKE="make LIBTOOL=${PKG_SLIBTOOL:-slibtool}"; + fi; + cd ${PKG_BUILD_DIR}; + set_build_script_done setup distclean -configure; +}; + +# vim:filetype=sh -- cgit v1.2.3