From: Lionel Orry <lionel.orry@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] pkg-waf: add support for <pkg>_SUBDIR
Date: Wed, 10 Oct 2018 16:44:12 +0200 [thread overview]
Message-ID: <20181010144412.3408-1-lionel.orry@gmail.com> (raw)
In the Buildroot manual, it is specified that the Waf-based
infrastructure supports the <pkg>_SUBDIR variable, which was not true.
This patch makes use of this variable by changing to the given
sub-directory before executing waf commands.
Signed-off-by: Lionel Orry <lionel.orry@gmail.com>
---
package/pkg-waf.mk | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/package/pkg-waf.mk b/package/pkg-waf.mk
index e5b606f063..826b73291b 100644
--- a/package/pkg-waf.mk
+++ b/package/pkg-waf.mk
@@ -54,13 +54,15 @@ $(2)_INSTALL_STAGING_OPTS ?=
$(2)_INSTALL_TARGET_OPTS ?=
$(2)_WAF_OPTS ?=
+$(2)_SRCDIR = $$($(2)_DIR)/$$($(2)_SUBDIR)
+
#
# Configure step. Only define it if not already defined by the package
# .mk file.
#
ifndef $(2)_CONFIGURE_CMDS
define $(2)_CONFIGURE_CMDS
- cd $$(@D) && \
+ cd $$($$(PKG)_SRCDIR) && \
$$(TARGET_CONFIGURE_OPTS) \
$$($(2)_CONF_ENV) \
$$(HOST_DIR)/bin/python2 $$($(2)_WAF) configure \
@@ -77,7 +79,7 @@ endif
#
ifndef $(2)_BUILD_CMDS
define $(2)_BUILD_CMDS
- cd $$(@D) && \
+ cd $$($$(PKG)_SRCDIR) && \
$$(TARGET_MAKE_ENV) $$(HOST_DIR)/bin/python2 $$($(2)_WAF) \
build -j $$(PARALLEL_JOBS) $$($(2)_BUILD_OPTS) \
$$($(2)_WAF_OPTS)
@@ -90,7 +92,7 @@ endif
#
ifndef $(2)_INSTALL_STAGING_CMDS
define $(2)_INSTALL_STAGING_CMDS
- cd $$(@D) && \
+ cd $$($$(PKG)_SRCDIR) && \
$$(TARGET_MAKE_ENV) $$(HOST_DIR)/bin/python2 $$($(2)_WAF) \
install --destdir=$$(STAGING_DIR) \
$$($(2)_INSTALL_STAGING_OPTS) \
@@ -104,7 +106,7 @@ endif
#
ifndef $(2)_INSTALL_TARGET_CMDS
define $(2)_INSTALL_TARGET_CMDS
- cd $$(@D) && \
+ cd $$($$(PKG)_SRCDIR) && \
$$(TARGET_MAKE_ENV) $$(HOST_DIR)/bin/python2 $$($(2)_WAF) \
install --destdir=$$(TARGET_DIR) \
$$($(2)_INSTALL_TARGET_OPTS) \
--
2.19.0
next reply other threads:[~2018-10-10 14:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-10 14:44 Lionel Orry [this message]
2018-10-10 15:06 ` [Buildroot] [PATCH 1/1] pkg-waf: add support for <pkg>_SUBDIR Marcel Patzlaff
2018-10-10 15:10 ` Lionel Orry
-- strict thread matches above, loose matches on Subject: below --
2018-09-19 13:31 Lionel Orry
2018-09-28 8:32 ` Lionel Orry
2018-10-10 19:47 ` Thomas Petazzoni
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=20181010144412.3408-1-lionel.orry@gmail.com \
--to=lionel.orry@gmail.com \
--cc=buildroot@busybox.net \
/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