diff options
author | Michał Górny <mgorny@gentoo.org> | 2013-03-04 19:22:13 +0000 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2013-03-04 19:22:13 +0000 |
commit | 6197e2f1f6bbe6a8d75f3377d5653dc02bc09b06 (patch) | |
tree | 782a630220ba203f8a27bbf32561e78a9891f257 /eclass | |
parent | Introduce multibuild.eclass to handle building multiple variants of the same ... (diff) | |
download | gentoo-2-6197e2f1f6bbe6a8d75f3377d5653dc02bc09b06.tar.gz gentoo-2-6197e2f1f6bbe6a8d75f3377d5653dc02bc09b06.tar.bz2 gentoo-2-6197e2f1f6bbe6a8d75f3377d5653dc02bc09b06.zip |
Move run_in_build_dir() to multibuild.eclass.
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/ChangeLog | 6 | ||||
-rw-r--r-- | eclass/multibuild.eclass | 21 | ||||
-rw-r--r-- | eclass/python-r1.eclass | 23 |
3 files changed, 27 insertions, 23 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog index ae1494834ca3..96feaccb7b5d 100644 --- a/eclass/ChangeLog +++ b/eclass/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for eclass directory # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.705 2013/03/04 19:21:27 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.706 2013/03/04 19:22:13 mgorny Exp $ + + 04 Mar 2013; Michał Górny <mgorny@gentoo.org> multibuild.eclass, + python-r1.eclass: + Move run_in_build_dir() to multibuild.eclass. 04 Mar 2013; Michał Górny <mgorny@gentoo.org> +multibuild.eclass: Introduce multibuild.eclass to handle building multiple variants of the same diff --git a/eclass/multibuild.eclass b/eclass/multibuild.eclass index 39e1772320f8..91f6bec86ece 100644 --- a/eclass/multibuild.eclass +++ b/eclass/multibuild.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/multibuild.eclass,v 1.1 2013/03/04 19:21:27 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/multibuild.eclass,v 1.2 2013/03/04 19:22:13 mgorny Exp $ # @ECLASS: multibuild # @MAINTAINER: @@ -174,5 +174,24 @@ multibuild_parallel_foreach_variant() { return ${ret} } +# @FUNCTION: run_in_build_dir +# @USAGE: <argv>... +# @DESCRIPTION: +# Run the given command in the directory pointed by BUILD_DIR. +run_in_build_dir() { + debug-print-function ${FUNCNAME} "${@}" + local ret + + [[ ${#} -ne 0 ]] || die "${FUNCNAME}: no command specified." + [[ ${BUILD_DIR} ]] || die "${FUNCNAME}: BUILD_DIR not set." + + pushd "${BUILD_DIR}" >/dev/null || die + "${@}" + ret=${?} + popd >/dev/null || die + + return ${ret} +} + _MULTIBUILD=1 fi diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass index 2849270a44e4..9d094b99977e 100644 --- a/eclass/python-r1.eclass +++ b/eclass/python-r1.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.44 2013/02/27 21:02:59 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.45 2013/03/04 19:22:13 mgorny Exp $ # @ECLASS: python-r1 # @MAINTAINER: @@ -48,7 +48,7 @@ elif [[ ${_PYTHON_ANY_R1} ]]; then die 'python-r1.eclass can not be used with python-any-r1.eclass.' fi -inherit python-utils-r1 +inherit multibuild python-utils-r1 # @ECLASS-VARIABLE: PYTHON_COMPAT # @REQUIRED @@ -690,24 +690,5 @@ python_replicate_script() { done } -# @FUNCTION: run_in_build_dir -# @USAGE: <argv>... -# @DESCRIPTION: -# Run the given command in the directory pointed by BUILD_DIR. -run_in_build_dir() { - debug-print-function ${FUNCNAME} "${@}" - local ret - - [[ ${#} -ne 0 ]] || die "${FUNCNAME}: no command specified." - [[ ${BUILD_DIR} ]] || die "${FUNCNAME}: BUILD_DIR not set." - - pushd "${BUILD_DIR}" >/dev/null || die - "${@}" - ret=${?} - popd >/dev/null || die - - return ${ret} -} - _PYTHON_R1=1 fi |