summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'eclass/autotools-utils.eclass')
-rw-r--r--eclass/autotools-utils.eclass27
1 files changed, 18 insertions, 9 deletions
diff --git a/eclass/autotools-utils.eclass b/eclass/autotools-utils.eclass
index 16dabbc1c4c9..0aa1679337e7 100644
--- a/eclass/autotools-utils.eclass
+++ b/eclass/autotools-utils.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/autotools-utils.eclass,v 1.28 2011/11/27 09:17:35 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/autotools-utils.eclass,v 1.29 2011/11/27 09:57:20 mgorny Exp $
# @ECLASS: autotools-utils.eclass
# @MAINTAINER:
@@ -205,6 +205,15 @@ remove_libtool_files() {
rm -f "${f}" || die
fi
done
+
+ # check for invalid eclass use
+ # this is the most commonly used function, so do it here
+ _check_build_dir
+ if [[ ! -d "${AUTOTOOLS_BUILD_DIR}" ]]; then
+ eqawarn "autotools-utils used but autotools-utils_src_configure was never called."
+ eqawarn "This is not supported and never was. Please report a bug against"
+ eqawarn "the offending ebuild. This will become a fatal error in a near future."
+ fi
}
# @FUNCTION: autotools-utils_src_prepare
@@ -250,9 +259,9 @@ autotools-utils_src_configure() {
_check_build_dir
mkdir -p "${AUTOTOOLS_BUILD_DIR}" || die "mkdir '${AUTOTOOLS_BUILD_DIR}' failed"
- pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null || die
+ pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null
base_src_configure "${econfargs[@]}" "$@"
- popd > /dev/null || die
+ popd > /dev/null
}
# @FUNCTION: autotools-utils_src_compile
@@ -262,9 +271,9 @@ autotools-utils_src_compile() {
debug-print-function ${FUNCNAME} "$@"
_check_build_dir
- pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null || die
+ pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null
base_src_compile "$@"
- popd > /dev/null || die
+ popd > /dev/null
}
# @FUNCTION: autotools-utils_src_install
@@ -279,9 +288,9 @@ autotools-utils_src_install() {
debug-print-function ${FUNCNAME} "$@"
_check_build_dir
- pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null || die
+ pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null
base_src_install "$@"
- popd > /dev/null || die
+ popd > /dev/null
# Remove libtool files and unnecessary static libs
remove_libtool_files
@@ -294,8 +303,8 @@ autotools-utils_src_test() {
debug-print-function ${FUNCNAME} "$@"
_check_build_dir
- pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null || die
+ pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null
# Run default src_test as defined in ebuild.sh
default_src_test
- popd > /dev/null || die
+ popd > /dev/null
}