From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: reavertm@gentoo.org, scarabeus@gentoo.org,
"Michał Górny" <mgorny@gentoo.org>
Subject: [gentoo-dev] [PATCH 1/4] autotools-utils: use common BUILD_DIR variable.
Date: Thu, 29 Nov 2012 14:40:55 +0100 [thread overview]
Message-ID: <1354196458-17485-2-git-send-email-mgorny@gentoo.org> (raw)
In-Reply-To: <1354196458-17485-1-git-send-email-mgorny@gentoo.org>
For interoperability with python-r1.
---
gx86/eclass/autotools-utils.eclass | 30 ++++++++++++++++++------------
1 file changed, 18 insertions(+), 12 deletions(-)
diff --git a/gx86/eclass/autotools-utils.eclass b/gx86/eclass/autotools-utils.eclass
index b035dc5..b6bfc96 100644
--- a/gx86/eclass/autotools-utils.eclass
+++ b/gx86/eclass/autotools-utils.eclass
@@ -76,10 +76,10 @@
# }
#
# src_install() {
-# use doc && HTML_DOCS=("${AUTOTOOLS_BUILD_DIR}/apidocs/html/")
+# use doc && HTML_DOCS=("${BUILD_DIR}/apidocs/html/")
# autotools-utils_src_install
# if use examples; then
-# dobin "${AUTOTOOLS_BUILD_DIR}"/foo_example{1,2,3} \\
+# dobin "${BUILD_DIR}"/foo_example{1,2,3} \\
# || die 'dobin examples failed'
# fi
# }
@@ -117,11 +117,14 @@ inherit autotools eutils libtool
EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install src_test
-# @ECLASS-VARIABLE: AUTOTOOLS_BUILD_DIR
+# @ECLASS-VARIABLE: BUILD_DIR
# @DEFAULT_UNSET
# @DESCRIPTION:
# Build directory, location where all autotools generated files should be
# placed. For out of source builds it defaults to ${WORKDIR}/${P}_build.
+#
+# This variable has been called AUTOTOOLS_BUILD_DIR formerly.
+# It is set under that name for compatibility.
# @ECLASS-VARIABLE: AUTOTOOLS_IN_SOURCE_BUILD
# @DEFAULT_UNSET
@@ -183,11 +186,14 @@ EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install src_test
_check_build_dir() {
: ${ECONF_SOURCE:=${S}}
if [[ -n ${AUTOTOOLS_IN_SOURCE_BUILD} ]]; then
- AUTOTOOLS_BUILD_DIR="${ECONF_SOURCE}"
+ BUILD_DIR="${ECONF_SOURCE}"
else
- : ${AUTOTOOLS_BUILD_DIR:=${WORKDIR}/${P}_build}
+ : ${BUILD_DIR:=${AUTOTOOLS_BUILD_DIR:-${WORKDIR}/${P}_build}}
fi
- echo ">>> Working in BUILD_DIR: \"$AUTOTOOLS_BUILD_DIR\""
+
+ # Backwards compatibility.
+ AUTOTOOLS_BUILD_DIR=${BUILD_DIR}
+ echo ">>> Working in BUILD_DIR: \"${BUILD_DIR}\""
}
# @FUNCTION: remove_libtool_files
@@ -413,20 +419,20 @@ autotools-utils_src_configure() {
# Append user args
econfargs+=("${myeconfargs[@]}")
- mkdir -p "${AUTOTOOLS_BUILD_DIR}" || die "mkdir '${AUTOTOOLS_BUILD_DIR}' failed"
- pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null || die
+ mkdir -p "${BUILD_DIR}" || die
+ pushd "${BUILD_DIR}" > /dev/null || die
econf "${econfargs[@]}" "$@"
popd > /dev/null || die
}
# @FUNCTION: autotools-utils_src_compile
# @DESCRIPTION:
-# The autotools src_compile function, invokes emake in specified AUTOTOOLS_BUILD_DIR.
+# The autotools src_compile function, invokes emake in specified BUILD_DIR.
autotools-utils_src_compile() {
debug-print-function ${FUNCNAME} "$@"
_check_build_dir
- pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null || die
+ pushd "${BUILD_DIR}" > /dev/null || die
emake "$@" || die 'emake failed'
popd > /dev/null || die
}
@@ -443,7 +449,7 @@ autotools-utils_src_install() {
debug-print-function ${FUNCNAME} "$@"
_check_build_dir
- pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null || die
+ pushd "${BUILD_DIR}" > /dev/null || die
emake DESTDIR="${D}" "$@" install || die "emake install failed"
popd > /dev/null || die
@@ -490,7 +496,7 @@ autotools-utils_src_test() {
debug-print-function ${FUNCNAME} "$@"
_check_build_dir
- pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null || die
+ pushd "${BUILD_DIR}" > /dev/null || die
# Run default src_test as defined in ebuild.sh
default_src_test
popd > /dev/null || die
--
1.8.0
next prev parent reply other threads:[~2012-11-29 13:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-29 13:40 [gentoo-dev] autotools-utils & cmake-utils: use common BUILD_DIR var Michał Górny
2012-11-29 13:40 ` Michał Górny [this message]
2012-11-29 13:40 ` [gentoo-dev] [PATCH 2/4] autotools-multilib: use and support BUILD_DIR Michał Górny
2012-11-29 13:40 ` [gentoo-dev] [PATCH 3/4] cmake-utils: support common BUILD_DIR variable Michał Górny
2012-11-29 13:40 ` [gentoo-dev] [PATCH 4/4] Example conversion of pygobject to python-r1 + autotools-utils Michał Górny
2012-11-29 16:50 ` Gilles Dartiguelongue
2012-11-29 17:53 ` Michał Górny
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1354196458-17485-2-git-send-email-mgorny@gentoo.org \
--to=mgorny@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
--cc=reavertm@gentoo.org \
--cc=scarabeus@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox