From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: python@gentoo.org, "Michał Górny" <mgorny@gentoo.org>
Subject: [gentoo-dev] [PATCH 1/3] multibuild: introduce generic multibuild_copy_sources.
Date: Wed, 6 Mar 2013 15:25:53 +0100 [thread overview]
Message-ID: <1362579955-31813-1-git-send-email-mgorny@gentoo.org> (raw)
The new function can be used to create per-variant copies of source
trees. Code based on python_copy_sources from python-r1.
---
gx86/eclass/multibuild.eclass | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/gx86/eclass/multibuild.eclass b/gx86/eclass/multibuild.eclass
index 8ccd3b6..65f3926 100644
--- a/gx86/eclass/multibuild.eclass
+++ b/gx86/eclass/multibuild.eclass
@@ -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:
--
1.8.1.5
next reply other threads:[~2013-03-06 14:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-06 14:25 Michał Górny [this message]
2013-03-06 14:25 ` [gentoo-dev] [PATCH 2/3] python-r1: use multibuild_copy_sources Michał Górny
2013-03-06 14:25 ` [gentoo-dev] [PATCH 3/3] multilib-build: introduce multilib_copy_sources 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=1362579955-31813-1-git-send-email-mgorny@gentoo.org \
--to=mgorny@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
--cc=python@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