Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [RFC 0/4] fixes for top-level parallel make
@ 2013-04-24 10:08 Fabio Porcedda
  2013-04-24 10:08 ` [Buildroot] [RFC 1/4] package: add toolchain dependency to inner-generic-package Fabio Porcedda
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Fabio Porcedda @ 2013-04-24 10:08 UTC (permalink / raw)
  To: buildroot

This patch set improve support for top-level parallel make,
the support for top-level parallel make is not complete, but at least
is a improvement.
I will submit a more complete patch set with more fixes.

Best regards
Fabio Porcedda (4):
  package: add toolchain dependency to inner-generic-package
  package: fix generic configure for top-level parallel make
  package: fix generic build for top-level parallel make
  package: fix generic install for top-level parallel make

 package/pkg-autotools.mk |  2 +-
 package/pkg-generic.mk   | 33 ++++++++++++++++++---------------
 2 files changed, 19 insertions(+), 16 deletions(-)

-- 
1.8.1.4

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

* [Buildroot] [RFC 1/4] package: add toolchain dependency to inner-generic-package
  2013-04-24 10:08 [Buildroot] [RFC 0/4] fixes for top-level parallel make Fabio Porcedda
@ 2013-04-24 10:08 ` Fabio Porcedda
  2013-04-24 10:08 ` [Buildroot] [RFC 2/4] package: fix generic configure for top-level parallel make Fabio Porcedda
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Fabio Porcedda @ 2013-04-24 10:08 UTC (permalink / raw)
  To: buildroot

This commit makes the dependency from the target toolchain explicit.
This way we can buid from command line a package that use
innger-generic-package right after the configuration phase.

This is a step forward top-level parallel make.

Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
---
 package/pkg-autotools.mk | 2 +-
 package/pkg-generic.mk   | 7 ++++++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/package/pkg-autotools.mk b/package/pkg-autotools.mk
index d8d7e6d..032f86c 100644
--- a/package/pkg-autotools.mk
+++ b/package/pkg-autotools.mk
@@ -201,7 +201,7 @@ endef
 # This must be repeated from inner-generic-package, otherwise we get an empty
 # _DEPENDENCIES if _AUTORECONF is YES.  Also filter the result of _AUTORECONF
 # away from the non-host rule
-$(2)_DEPENDENCIES ?= $(filter-out host-automake host-autoconf host-libtool $(1),\
+$(2)_DEPENDENCIES ?= $(filter-out host-automake host-autoconf host-libtool host-toolchain $(1),\
     $(patsubst host-host-%,host-%,$(addprefix host-,$($(3)_DEPENDENCIES))))
 
 
diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index e6bc955..2460384 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -304,7 +304,12 @@ endif
 $(2)_REDISTRIBUTE		?= YES
 
 
-$(2)_DEPENDENCIES ?= $(filter-out $(1),$(patsubst host-host-%,host-%,$(addprefix host-,$($(3)_DEPENDENCIES))))
+$(2)_DEPENDENCIES ?= $(filter-out host-toolchain $(1),\
+	$(patsubst host-host-%,host-%,$(addprefix host-,$($(3)_DEPENDENCIES))))
+ifeq ($$($(2)_TYPE),target)
+$(2)_DEPENDENCIES += toolchain
+endif
+
 
 $(2)_INSTALL_STAGING		?= NO
 $(2)_INSTALL_IMAGES		?= NO
-- 
1.8.1.4

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

* [Buildroot] [RFC 2/4] package: fix generic configure for top-level parallel make
  2013-04-24 10:08 [Buildroot] [RFC 0/4] fixes for top-level parallel make Fabio Porcedda
  2013-04-24 10:08 ` [Buildroot] [RFC 1/4] package: add toolchain dependency to inner-generic-package Fabio Porcedda
@ 2013-04-24 10:08 ` Fabio Porcedda
  2013-04-24 14:11   ` Thomas Petazzoni
  2013-04-24 10:08 ` [Buildroot] [RFC 3/4] package: fix generic build " Fabio Porcedda
  2013-04-24 10:08 ` [Buildroot] [RFC 4/4] package: fix generic install " Fabio Porcedda
  3 siblings, 1 reply; 7+ messages in thread
From: Fabio Porcedda @ 2013-04-24 10:08 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
---
 package/pkg-generic.mk | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index 2460384..455d0ef 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -386,6 +386,8 @@ $(1)-install-host:      $(1)-build $$($(2)_TARGET_INSTALL_HOST)
 $(1)-build:		$(1)-configure \
 			$$($(2)_TARGET_BUILD)
 
+$$($(2)_TARGET_CONFIGURE): $(1)-depends
+$(1)-configure:		$$($(2)_TARGET_CONFIGURE)
 ifeq ($$($(2)_OVERRIDE_SRCDIR),)
 # In the normal case (no package override), the sequence of steps is
 #  source, by downloading
@@ -393,8 +395,7 @@ ifeq ($$($(2)_OVERRIDE_SRCDIR),)
 #  extract
 #  patch
 #  configure
-$(1)-configure:		$(1)-patch $(1)-depends \
-			$$($(2)_TARGET_CONFIGURE)
+$$($(2)_TARGET_CONFIGURE): $(1)-patch
 
 $(1)-patch:		$(1)-extract $$($(2)_TARGET_PATCH)
 
@@ -409,9 +410,6 @@ else
 #  source, by rsyncing
 #  depends
 #  configure
-$(1)-configure:		$(1)-depends \
-			$$($(2)_TARGET_CONFIGURE)
-
 $(1)-depends:		$(1)-rsync $$($(2)_DEPENDENCIES)
 
 $(1)-patch:		$(1)-rsync
-- 
1.8.1.4

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

* [Buildroot] [RFC 3/4] package: fix generic build for top-level parallel make
  2013-04-24 10:08 [Buildroot] [RFC 0/4] fixes for top-level parallel make Fabio Porcedda
  2013-04-24 10:08 ` [Buildroot] [RFC 1/4] package: add toolchain dependency to inner-generic-package Fabio Porcedda
  2013-04-24 10:08 ` [Buildroot] [RFC 2/4] package: fix generic configure for top-level parallel make Fabio Porcedda
@ 2013-04-24 10:08 ` Fabio Porcedda
  2013-04-24 10:08 ` [Buildroot] [RFC 4/4] package: fix generic install " Fabio Porcedda
  3 siblings, 0 replies; 7+ messages in thread
From: Fabio Porcedda @ 2013-04-24 10:08 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
---
 package/pkg-generic.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index 455d0ef..09ddd81 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -383,8 +383,8 @@ endif
 
 $(1)-install-host:      $(1)-build $$($(2)_TARGET_INSTALL_HOST)
 
-$(1)-build:		$(1)-configure \
-			$$($(2)_TARGET_BUILD)
+$$($(2)_TARGET_BUILD): $(1)-configure
+$(1)-build:		$$($(2)_TARGET_BUILD)
 
 $$($(2)_TARGET_CONFIGURE): $(1)-depends
 $(1)-configure:		$$($(2)_TARGET_CONFIGURE)
-- 
1.8.1.4

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

* [Buildroot] [RFC 4/4] package: fix generic install for top-level parallel make
  2013-04-24 10:08 [Buildroot] [RFC 0/4] fixes for top-level parallel make Fabio Porcedda
                   ` (2 preceding siblings ...)
  2013-04-24 10:08 ` [Buildroot] [RFC 3/4] package: fix generic build " Fabio Porcedda
@ 2013-04-24 10:08 ` Fabio Porcedda
  3 siblings, 0 replies; 7+ messages in thread
From: Fabio Porcedda @ 2013-04-24 10:08 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
---
 package/pkg-generic.mk | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index 09ddd81..c4ef0fb 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -360,28 +360,28 @@ else
 $(1)-install:		$(1)-install-staging $(1)-install-target $(1)-install-images
 endif
 
+$$($(2)_TARGET_INSTALL_TARGET) $$($(2)_TARGET_INSTALL_STAGING) \
+	$$($(2)_TARGET_INSTALL_IMAGES) $$($(2)_TARGET_INSTALL_HOST): $(1)-build
+
 ifeq ($$($(2)_INSTALL_TARGET),YES)
-$(1)-install-target:	$(1)-build \
-			$$($(2)_TARGET_INSTALL_TARGET)
+$(1)-install-target:	$$($(2)_TARGET_INSTALL_TARGET)
 else
 $(1)-install-target:
 endif
 
 ifeq ($$($(2)_INSTALL_STAGING),YES)
-$(1)-install-staging:	$(1)-build \
-			$$($(2)_TARGET_INSTALL_STAGING)
+$(1)-install-staging:	$$($(2)_TARGET_INSTALL_STAGING)
 else
 $(1)-install-staging:
 endif
 
 ifeq ($$($(2)_INSTALL_IMAGES),YES)
-$(1)-install-images:	$(1)-build \
-			$$($(2)_TARGET_INSTALL_IMAGES)
+$(1)-install-images:	$$($(2)_TARGET_INSTALL_IMAGES)
 else
 $(1)-install-images:
 endif
 
-$(1)-install-host:      $(1)-build $$($(2)_TARGET_INSTALL_HOST)
+$(1)-install-host:      $$($(2)_TARGET_INSTALL_HOST)
 
 $$($(2)_TARGET_BUILD): $(1)-configure
 $(1)-build:		$$($(2)_TARGET_BUILD)
-- 
1.8.1.4

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

* [Buildroot] [RFC 2/4] package: fix generic configure for top-level parallel make
  2013-04-24 10:08 ` [Buildroot] [RFC 2/4] package: fix generic configure for top-level parallel make Fabio Porcedda
@ 2013-04-24 14:11   ` Thomas Petazzoni
  2013-04-24 16:25     ` Fabio Porcedda
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Petazzoni @ 2013-04-24 14:11 UTC (permalink / raw)
  To: buildroot

Dear Fabio Porcedda,

Could you add a detailed commit description for patches 2, 3 and 4 ?
Those patches are touching core infrastructure, so they should be
explained in detail. Thanks!

Thomas

On Wed, 24 Apr 2013 12:08:56 +0200, Fabio Porcedda wrote:
> Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
> ---
>  package/pkg-generic.mk | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
> index 2460384..455d0ef 100644
> --- a/package/pkg-generic.mk
> +++ b/package/pkg-generic.mk
> @@ -386,6 +386,8 @@ $(1)-install-host:      $(1)-build $$($(2)_TARGET_INSTALL_HOST)
>  $(1)-build:		$(1)-configure \
>  			$$($(2)_TARGET_BUILD)
>  
> +$$($(2)_TARGET_CONFIGURE): $(1)-depends
> +$(1)-configure:		$$($(2)_TARGET_CONFIGURE)
>  ifeq ($$($(2)_OVERRIDE_SRCDIR),)
>  # In the normal case (no package override), the sequence of steps is
>  #  source, by downloading
> @@ -393,8 +395,7 @@ ifeq ($$($(2)_OVERRIDE_SRCDIR),)
>  #  extract
>  #  patch
>  #  configure
> -$(1)-configure:		$(1)-patch $(1)-depends \
> -			$$($(2)_TARGET_CONFIGURE)
> +$$($(2)_TARGET_CONFIGURE): $(1)-patch
>  
>  $(1)-patch:		$(1)-extract $$($(2)_TARGET_PATCH)
>  
> @@ -409,9 +410,6 @@ else
>  #  source, by rsyncing
>  #  depends
>  #  configure
> -$(1)-configure:		$(1)-depends \
> -			$$($(2)_TARGET_CONFIGURE)
> -
>  $(1)-depends:		$(1)-rsync $$($(2)_DEPENDENCIES)
>  
>  $(1)-patch:		$(1)-rsync



-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* [Buildroot] [RFC 2/4] package: fix generic configure for top-level parallel make
  2013-04-24 14:11   ` Thomas Petazzoni
@ 2013-04-24 16:25     ` Fabio Porcedda
  0 siblings, 0 replies; 7+ messages in thread
From: Fabio Porcedda @ 2013-04-24 16:25 UTC (permalink / raw)
  To: buildroot

On Wed, Apr 24, 2013 at 4:11 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Dear Fabio Porcedda,
>
> Could you add a detailed commit description for patches 2, 3 and 4 ?
> Those patches are touching core infrastructure, so they should be
> explained in detail. Thanks!

Hi Thomas,
Thanks for reviewing.

I will do that in the next iteration.

Something like:

Some rules depends on the left-to-right evaluation order of prerequisites,
but that works only in non-parallel makefiles.
To fix that it must use instead a new rule to clarify that dependency.

Best regards
Fabio Porcedda

> Thomas
>
> On Wed, 24 Apr 2013 12:08:56 +0200, Fabio Porcedda wrote:
>> Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
>> ---
>>  package/pkg-generic.mk | 8 +++-----
>>  1 file changed, 3 insertions(+), 5 deletions(-)
>>
>> diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
>> index 2460384..455d0ef 100644
>> --- a/package/pkg-generic.mk
>> +++ b/package/pkg-generic.mk
>> @@ -386,6 +386,8 @@ $(1)-install-host:      $(1)-build $$($(2)_TARGET_INSTALL_HOST)
>>  $(1)-build:          $(1)-configure \
>>                       $$($(2)_TARGET_BUILD)
>>
>> +$$($(2)_TARGET_CONFIGURE): $(1)-depends
>> +$(1)-configure:              $$($(2)_TARGET_CONFIGURE)
>>  ifeq ($$($(2)_OVERRIDE_SRCDIR),)
>>  # In the normal case (no package override), the sequence of steps is
>>  #  source, by downloading
>> @@ -393,8 +395,7 @@ ifeq ($$($(2)_OVERRIDE_SRCDIR),)
>>  #  extract
>>  #  patch
>>  #  configure
>> -$(1)-configure:              $(1)-patch $(1)-depends \
>> -                     $$($(2)_TARGET_CONFIGURE)
>> +$$($(2)_TARGET_CONFIGURE): $(1)-patch
>>
>>  $(1)-patch:          $(1)-extract $$($(2)_TARGET_PATCH)
>>
>> @@ -409,9 +410,6 @@ else
>>  #  source, by rsyncing
>>  #  depends
>>  #  configure
>> -$(1)-configure:              $(1)-depends \
>> -                     $$($(2)_TARGET_CONFIGURE)
>> -
>>  $(1)-depends:                $(1)-rsync $$($(2)_DEPENDENCIES)
>>
>>  $(1)-patch:          $(1)-rsync
>
>
>
> --
> Thomas Petazzoni, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com

--
Fabio Porcedda

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

end of thread, other threads:[~2013-04-24 16:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-24 10:08 [Buildroot] [RFC 0/4] fixes for top-level parallel make Fabio Porcedda
2013-04-24 10:08 ` [Buildroot] [RFC 1/4] package: add toolchain dependency to inner-generic-package Fabio Porcedda
2013-04-24 10:08 ` [Buildroot] [RFC 2/4] package: fix generic configure for top-level parallel make Fabio Porcedda
2013-04-24 14:11   ` Thomas Petazzoni
2013-04-24 16:25     ` Fabio Porcedda
2013-04-24 10:08 ` [Buildroot] [RFC 3/4] package: fix generic build " Fabio Porcedda
2013-04-24 10:08 ` [Buildroot] [RFC 4/4] package: fix generic install " Fabio Porcedda

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