Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] pkg-waf: add support for <pkg>_SUBDIR
@ 2018-09-19 13:31 Lionel Orry
  2018-09-28  8:32 ` Lionel Orry
  2018-10-10 19:47 ` Thomas Petazzoni
  0 siblings, 2 replies; 6+ messages in thread
From: Lionel Orry @ 2018-09-19 13:31 UTC (permalink / raw)
  To: buildroot

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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 1/1] pkg-waf: add support for <pkg>_SUBDIR
  2018-09-19 13:31 [Buildroot] [PATCH 1/1] pkg-waf: add support for <pkg>_SUBDIR Lionel Orry
@ 2018-09-28  8:32 ` Lionel Orry
  2018-10-10 19:47 ` Thomas Petazzoni
  1 sibling, 0 replies; 6+ messages in thread
From: Lionel Orry @ 2018-09-28  8:32 UTC (permalink / raw)
  To: buildroot

Hello, does anyone have the time to look at this small patch ? Thanks a lot!

Best regards,
Lionel
On Wed, Sep 19, 2018 at 3:31 PM Lionel Orry <lionel.orry@gmail.com> wrote:
>
> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 1/1] pkg-waf: add support for <pkg>_SUBDIR
@ 2018-10-10 14:44 Lionel Orry
  2018-10-10 15:06 ` Marcel Patzlaff
  0 siblings, 1 reply; 6+ messages in thread
From: Lionel Orry @ 2018-10-10 14:44 UTC (permalink / raw)
  To: buildroot

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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 1/1] pkg-waf: add support for <pkg>_SUBDIR
  2018-10-10 14:44 Lionel Orry
@ 2018-10-10 15:06 ` Marcel Patzlaff
  2018-10-10 15:10   ` Lionel Orry
  0 siblings, 1 reply; 6+ messages in thread
From: Marcel Patzlaff @ 2018-10-10 15:06 UTC (permalink / raw)
  To: buildroot

Hi Lionel,

how is this patch different from 
https://patchwork.ozlabs.org/patch/971700/ ?

Gesch?ftsf?hrung: Susanne Kunschert, Thomas Pilz
Pilz GmbH & Co. KG, Sitz: Ostfildern, HRA 210 893, Amtsgericht Stuttgart
Kompl. Ges. Peter Pilz GmbH, Sitz: Ostfildern, HRB 210 612, Amtsgericht Stuttgart
Umsatzsteuer: ID-Nr. DE 145 355 773, WEEE-Reg.-Nr. DE 71636849
This email is intended solely for the use of the named address(es). Any unauthorised disclosure, copying or distribution of these confidential information contained therein, or the taking of any action based on it, is prohibited. The sender disclaims any liability for the integrity of this email. Legally binding declarations must be in written form.
Umweltschutz liegt uns am Herzen! - Bitte denken Sie an unsere Umwelt, bevor Sie diese E-Mail drucken.
We do care about the environment! - Please consider the environment before printing this e-mail.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 1/1] pkg-waf: add support for <pkg>_SUBDIR
  2018-10-10 15:06 ` Marcel Patzlaff
@ 2018-10-10 15:10   ` Lionel Orry
  0 siblings, 0 replies; 6+ messages in thread
From: Lionel Orry @ 2018-10-10 15:10 UTC (permalink / raw)
  To: buildroot

On Wed, Oct 10, 2018 at 5:06 PM Marcel Patzlaff <M.Patzlaff@pilz.de> wrote:
>
> Hi Lionel,
>
> how is this patch different from
> https://patchwork.ozlabs.org/patch/971700/ ?
>
> Gesch?ftsf?hrung: Susanne Kunschert, Thomas Pilz
> Pilz GmbH & Co. KG, Sitz: Ostfildern, HRA 210 893, Amtsgericht Stuttgart
> Kompl. Ges. Peter Pilz GmbH, Sitz: Ostfildern, HRB 210 612, Amtsgericht Stuttgart
> Umsatzsteuer: ID-Nr. DE 145 355 773, WEEE-Reg.-Nr. DE 71636849
> This email is intended solely for the use of the named address(es). Any unauthorised disclosure, copying or distribution of these confidential information contained therein, or the taking of any action based on it, is prohibited. The sender disclaims any liability for the integrity of this email. Legally binding declarations must be in written form.
> Umweltschutz liegt uns am Herzen! - Bitte denken Sie an unsere Umwelt, bevor Sie diese E-Mail drucken.
> We do care about the environment! - Please consider the environment before printing this e-mail.

Hi Marcel,

This is not different, it's the same version but it seemed to be the
previous email was wrongly sent (because I could not use git
send-email) and it seemed to me that I needed to re-send it properly
for the mailing-list to receive it.

So, I apologise for this duplicated sending and the noise it provoked
on the line.

Best regards,
Lionel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 1/1] pkg-waf: add support for <pkg>_SUBDIR
  2018-09-19 13:31 [Buildroot] [PATCH 1/1] pkg-waf: add support for <pkg>_SUBDIR Lionel Orry
  2018-09-28  8:32 ` Lionel Orry
@ 2018-10-10 19:47 ` Thomas Petazzoni
  1 sibling, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2018-10-10 19:47 UTC (permalink / raw)
  To: buildroot

Hello Lionel,

Thanks for your patch, sorry for the slow reply. See some feedback
below.

On Wed, 19 Sep 2018 15:31:40 +0200, Lionel Orry wrote:
> 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>

First, could you update the Buildroot manual to document this new
variable of the waf package infrastructure ?

> +$(2)_SRCDIR            = $$($(2)_DIR)/$$($(2)_SUBDIR)

Could you try after dropping this line? In fact the generic package
infrastructure already defines <pkg>_SRCDIR as <pkg>_DIR/<pkg>_SUBDIR,
so it shouldn't be needed to replicate that here.

And bonus point if you submit another patch that drops those redundant
lines from pkg-cmake, pkg-meson and pkg-python, of course after testing
that it still works fine :)

Thanks a lot!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-10-10 19:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-19 13:31 [Buildroot] [PATCH 1/1] pkg-waf: add support for <pkg>_SUBDIR Lionel Orry
2018-09-28  8:32 ` Lionel Orry
2018-10-10 19:47 ` Thomas Petazzoni
  -- strict thread matches above, loose matches on Subject: below --
2018-10-10 14:44 Lionel Orry
2018-10-10 15:06 ` Marcel Patzlaff
2018-10-10 15:10   ` Lionel Orry

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox