diff mbox series

[next,v6,08/10] Makefile: allow top-level parallel build with BR2_PER_PACKAGE_DIRECTORIES=y

Message ID 20181123145815.13008-9-thomas.petazzoni@bootlin.com
State Superseded
Headers show
Series Per-package host/target directory support | expand

Commit Message

Thomas Petazzoni Nov. 23, 2018, 2:58 p.m. UTC
With per-package folder support, top-level parallel build becomes
safe, so we can enclose the .NOTPARALLEL statement in a
!BR2_PER_PACKAGE_DIRECTORIES condition.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 Makefile | 2 ++
 1 file changed, 2 insertions(+)

Comments

Yann E. MORIN Nov. 23, 2018, 6:11 p.m. UTC | #1
Thomas, All,

On 2018-11-23 15:58 +0100, Thomas Petazzoni spake thusly:
> With per-package folder support, top-level parallel build becomes
> safe, so we can enclose the .NOTPARALLEL statement in a
> !BR2_PER_PACKAGE_DIRECTORIES condition.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> ---
>  Makefile | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/Makefile b/Makefile
> index 35fe1b3644..7bd7291cfd 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -231,6 +231,7 @@ ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
>  -include $(BR2_CONFIG)
>  endif
>  
> +ifeq ($(BR2_PER_PACKAGE_DIRECTORIES),)
>  # Parallel execution of this Makefile is disabled because it changes
>  # the packages building order, that can be a problem for two reasons:
>  # - If a package has an unspecified optional dependency and that
> @@ -246,6 +247,7 @@ endif
>  # use the -j<jobs> option when building, e.g:
>  #      make -j$((`getconf _NPROCESSORS_ONLN`+1))

The biggish comment is now completely wrong. The correct solution is not
to remove the line, but to enable the BR2_PER_PACKAGE_DIRECTORIES option.

Regards,
Yann E. MORIN.

>  .NOTPARALLEL:
> +endif
>  
>  ifeq ($(BR2_PER_PACKAGE_DIRECTORIES),y)
>  TARGET_DIR = $(if $(ROOTFS),$(ROOTFS_$(ROOTFS)_TARGET_DIR),$(if $(PKG),$(PER_PACKAGE_DIR)/$($(PKG)_NAME)/target,$(BASE_TARGET_DIR)))
> -- 
> 2.19.1
>
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index 35fe1b3644..7bd7291cfd 100644
--- a/Makefile
+++ b/Makefile
@@ -231,6 +231,7 @@  ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
 -include $(BR2_CONFIG)
 endif
 
+ifeq ($(BR2_PER_PACKAGE_DIRECTORIES),)
 # Parallel execution of this Makefile is disabled because it changes
 # the packages building order, that can be a problem for two reasons:
 # - If a package has an unspecified optional dependency and that
@@ -246,6 +247,7 @@  endif
 # use the -j<jobs> option when building, e.g:
 #      make -j$((`getconf _NPROCESSORS_ONLN`+1))
 .NOTPARALLEL:
+endif
 
 ifeq ($(BR2_PER_PACKAGE_DIRECTORIES),y)
 TARGET_DIR = $(if $(ROOTFS),$(ROOTFS_$(ROOTFS)_TARGET_DIR),$(if $(PKG),$(PER_PACKAGE_DIR)/$($(PKG)_NAME)/target,$(BASE_TARGET_DIR)))