package: enable jobserver for recursive make

Add '+' prefix to the $($(PKG)_BUILD_CMDS) and $($(PKG)_INSTALL*_CMDS)
commands to enable jobserver for the sub-make.

Without the '+' prefix GNU make does not detect the sub-make so it
disable the jobserver for the sub-make.

>From GNU make documentation:
Using the MAKE variable has the same effect as using a ‘+’ character
at the beginning of the recipe line.  This special feature is only
enabled if the MAKE variable appears directly in the recipe: it does
not apply if the MAKE variable is referenced through expansion of
another variable. In the latter case you must use the ‘+’ token to get
these special effects.

Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
Fabio Porcedda 2014-02-14 10:55:07 +01:00 committed by Peter Korsgaard
parent a24877586a
commit 069b33a30e

View File

@ -173,7 +173,7 @@ $(BUILD_DIR)/%/.stamp_configured:
$(BUILD_DIR)/%/.stamp_built:: $(BUILD_DIR)/%/.stamp_built::
@$(call step_start,build) @$(call step_start,build)
@$(call MESSAGE,"Building") @$(call MESSAGE,"Building")
$($(PKG)_BUILD_CMDS) +$($(PKG)_BUILD_CMDS)
$(foreach hook,$($(PKG)_POST_BUILD_HOOKS),$(call $(hook))$(sep)) $(foreach hook,$($(PKG)_POST_BUILD_HOOKS),$(call $(hook))$(sep))
$(Q)touch $@ $(Q)touch $@
@$(call step_end,build) @$(call step_end,build)
@ -182,7 +182,7 @@ $(BUILD_DIR)/%/.stamp_built::
$(BUILD_DIR)/%/.stamp_host_installed: $(BUILD_DIR)/%/.stamp_host_installed:
@$(call step_start,install-host) @$(call step_start,install-host)
@$(call MESSAGE,"Installing to host directory") @$(call MESSAGE,"Installing to host directory")
$($(PKG)_INSTALL_CMDS) +$($(PKG)_INSTALL_CMDS)
$(foreach hook,$($(PKG)_POST_INSTALL_HOOKS),$(call $(hook))$(sep)) $(foreach hook,$($(PKG)_POST_INSTALL_HOOKS),$(call $(hook))$(sep))
$(Q)touch $@ $(Q)touch $@
@$(call step_end,install-host) @$(call step_end,install-host)
@ -191,7 +191,7 @@ $(BUILD_DIR)/%/.stamp_host_installed:
$(BUILD_DIR)/%/.stamp_staging_installed: $(BUILD_DIR)/%/.stamp_staging_installed:
@$(call step_start,install-staging) @$(call step_start,install-staging)
@$(call MESSAGE,"Installing to staging directory") @$(call MESSAGE,"Installing to staging directory")
$($(PKG)_INSTALL_STAGING_CMDS) +$($(PKG)_INSTALL_STAGING_CMDS)
$(foreach hook,$($(PKG)_POST_INSTALL_STAGING_HOOKS),$(call $(hook))$(sep)) $(foreach hook,$($(PKG)_POST_INSTALL_STAGING_HOOKS),$(call $(hook))$(sep))
$(Q)if test -n "$($(PKG)_CONFIG_SCRIPTS)" ; then \ $(Q)if test -n "$($(PKG)_CONFIG_SCRIPTS)" ; then \
$(call MESSAGE,"Fixing package configuration files") ;\ $(call MESSAGE,"Fixing package configuration files") ;\
@ -207,7 +207,7 @@ $(BUILD_DIR)/%/.stamp_staging_installed:
$(BUILD_DIR)/%/.stamp_images_installed: $(BUILD_DIR)/%/.stamp_images_installed:
@$(call step_start,install-image) @$(call step_start,install-image)
@$(call MESSAGE,"Installing to images directory") @$(call MESSAGE,"Installing to images directory")
$($(PKG)_INSTALL_IMAGES_CMDS) +$($(PKG)_INSTALL_IMAGES_CMDS)
$(foreach hook,$($(PKG)_POST_INSTALL_IMAGES_HOOKS),$(call $(hook))$(sep)) $(foreach hook,$($(PKG)_POST_INSTALL_IMAGES_HOOKS),$(call $(hook))$(sep))
$(Q)touch $@ $(Q)touch $@
@$(call step_end,install-image) @$(call step_end,install-image)
@ -220,7 +220,7 @@ $(BUILD_DIR)/%/.stamp_target_installed:
$($(PKG)_INSTALL_INIT_SYSTEMD)) $($(PKG)_INSTALL_INIT_SYSTEMD))
$(if $(BR2_INIT_SYSV)$(BR2_INIT_BUSYBOX),\ $(if $(BR2_INIT_SYSV)$(BR2_INIT_BUSYBOX),\
$($(PKG)_INSTALL_INIT_SYSV)) $($(PKG)_INSTALL_INIT_SYSV))
$($(PKG)_INSTALL_TARGET_CMDS) +$($(PKG)_INSTALL_TARGET_CMDS)
$(foreach hook,$($(PKG)_POST_INSTALL_TARGET_HOOKS),$(call $(hook))$(sep)) $(foreach hook,$($(PKG)_POST_INSTALL_TARGET_HOOKS),$(call $(hook))$(sep))
$(Q)if test -n "$($(PKG)_CONFIG_SCRIPTS)" ; then \ $(Q)if test -n "$($(PKG)_CONFIG_SCRIPTS)" ; then \
$(RM) -f $(addprefix $(TARGET_DIR)/usr/bin/,$($(PKG)_CONFIG_SCRIPTS)) ; \ $(RM) -f $(addprefix $(TARGET_DIR)/usr/bin/,$($(PKG)_CONFIG_SCRIPTS)) ; \