diff options
author | Michał Górny <mgorny@gentoo.org> | 2013-03-09 13:51:02 +0000 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2013-03-09 13:51:02 +0000 |
commit | c99f6717cbb16e262dd2c60bb3aefd9dcaf368d2 (patch) | |
tree | c63a2fff22943b084a1b8f28d3d86121cb85c08d /eclass/multibuild.eclass | |
parent | Version bump. Move nss_myhostname to rootfs and install zsh completion (both ... (diff) | |
download | gentoo-2-c99f6717cbb16e262dd2c60bb3aefd9dcaf368d2.tar.gz gentoo-2-c99f6717cbb16e262dd2c60bb3aefd9dcaf368d2.tar.bz2 gentoo-2-c99f6717cbb16e262dd2c60bb3aefd9dcaf368d2.zip |
Introduce multibuild_copy_sources as a generic source duplicating function.
Diffstat (limited to 'eclass/multibuild.eclass')
-rw-r--r-- | eclass/multibuild.eclass | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/eclass/multibuild.eclass b/eclass/multibuild.eclass index 8ccd3b62d06b..87c7cc7bbca3 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.4 2013/03/04 19:27:24 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/multibuild.eclass,v 1.5 2013/03/09 13:51:02 mgorny Exp $ # @ECLASS: multibuild # @MAINTAINER: @@ -205,6 +205,27 @@ multibuild_for_best_variant() { multibuild_foreach_variant "${@}" } +# @FUNCTION: multibuild_copy_sources +# @DESCRIPTION: +# Create per-variant copies of source tree. The source tree is assumed +# to be in ${BUILD_DIR}, or ${S} if the former is unset. The copies will +# be placed in directories matching BUILD_DIRs used by +# multibuild_foreach(). +multibuild_copy_sources() { + debug-print-function ${FUNCNAME} "${@}" + + local _MULTIBUILD_INITIAL_BUILD_DIR=${BUILD_DIR:-${S}} + + einfo "Will copy sources from ${_MULTIBUILD_INITIAL_BUILD_DIR}" + + _multibuild_create_source_copy() { + einfo "${impl}: copying to ${BUILD_DIR}" + cp -pr "${_MULTIBUILD_INITIAL_BUILD_DIR}" "${BUILD_DIR}" || die + } + + multibuild_foreach_variant _multibuild_create_source_copy +} + # @FUNCTION: run_in_build_dir # @USAGE: <argv>... # @DESCRIPTION: |