All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v3 0/5] Add TARGET_FINALIZE_HOOKS
@ 2014-06-27 12:15 Fabio Porcedda
  2014-06-27 12:15 ` [Buildroot] [PATCH v3 1/5] Makefile: target-finalize: add TARGET_FINALIZE_HOOKS Fabio Porcedda
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Fabio Porcedda @ 2014-06-27 12:15 UTC (permalink / raw)
  To: buildroot

This patch set add TARGET_FINALIZE_HOOKS and use it for system.mk
recipies.

The changelog is on each patch.

Best regards
Fabio Porcedda (5):
  Makefile: target-finalize: add TARGET_FINALIZE_HOOKS
  system: convert "system.mk" recipes to "target-finalize" hooks
  Makefile: convert "toolchain-eclipse-register" to a hook
  Makefile: convert "target-generatelocales" to a hook
  Makefile: do not add to targets common dependencies

 Makefile         | 88 +++++++++++++++++++++++++++-----------------------------
 system/system.mk | 80 +++++++++++++++++++++++++++------------------------
 2 files changed, 85 insertions(+), 83 deletions(-)

-- 
2.0.0

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

* [Buildroot] [PATCH v3 1/5] Makefile: target-finalize: add TARGET_FINALIZE_HOOKS
  2014-06-27 12:15 [Buildroot] [PATCH v3 0/5] Add TARGET_FINALIZE_HOOKS Fabio Porcedda
@ 2014-06-27 12:15 ` Fabio Porcedda
  2014-06-27 12:15 ` [Buildroot] [PATCH v3 2/5] system: convert "system.mk" recipes to "target-finalize" hooks Fabio Porcedda
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Fabio Porcedda @ 2014-06-27 12:15 UTC (permalink / raw)
  To: buildroot

From: Fabio Porcedda <fabio.porcedda@gmail.com>

Add TARGET_FINALIZE_HOOKS to the "target-finalize" rule to be able to
add to it commands as needed.
This is useful for having a nicer output because commands are executed
after the "target-finalize" initial message, also it is useful to ensure
an executing order even when top-level parallel makefile is being used.

Also convert "TARGET_PURGE_LOCALES" to a hook that uses
"TARGET_FINALIZE_HOOKS".

Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---

Notes:
    v3:
     - Add in the description a note about TARGET_PURGE_LOCALES (Arnout)
     - Add Reviewed-by: Arnout

 Makefile | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index af694b9..3e845f6 100644
--- a/Makefile
+++ b/Makefile
@@ -513,7 +513,7 @@ ifeq ($(BR2_ENABLE_LOCALE_PURGE),y)
 LOCALE_WHITELIST = $(BUILD_DIR)/locales.nopurge
 LOCALE_NOPURGE = $(call qstrip,$(BR2_ENABLE_LOCALE_WHITELIST))
 
-define TARGET_PURGE_LOCALES
+define PURGE_LOCALES
 	rm -f $(LOCALE_WHITELIST)
 	for i in $(LOCALE_NOPURGE); do echo $$i >> $(LOCALE_WHITELIST); done
 
@@ -525,13 +525,14 @@ define TARGET_PURGE_LOCALES
 		done; \
 	done
 endef
+TARGET_FINALIZE_HOOKS += PURGE_LOCALES
 endif
 
 $(TARGETS_ROOTFS): target-finalize
 
 target-finalize: $(TARGETS)
 	@$(call MESSAGE,"Finalizing target directory")
-	$(TARGET_PURGE_LOCALES)
+	$(foreach hook,$(TARGET_FINALIZE_HOOKS),$($(hook))$(sep))
 	rm -rf $(TARGET_DIR)/usr/include $(TARGET_DIR)/usr/share/aclocal \
 		$(TARGET_DIR)/usr/lib/pkgconfig $(TARGET_DIR)/usr/share/pkgconfig \
 		$(TARGET_DIR)/usr/lib/cmake $(TARGET_DIR)/usr/share/cmake
-- 
2.0.0

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

* [Buildroot] [PATCH v3 2/5] system: convert "system.mk" recipes to "target-finalize" hooks
  2014-06-27 12:15 [Buildroot] [PATCH v3 0/5] Add TARGET_FINALIZE_HOOKS Fabio Porcedda
  2014-06-27 12:15 ` [Buildroot] [PATCH v3 1/5] Makefile: target-finalize: add TARGET_FINALIZE_HOOKS Fabio Porcedda
@ 2014-06-27 12:15 ` Fabio Porcedda
  2014-06-29 14:56   ` Thomas Petazzoni
  2014-06-27 12:15 ` [Buildroot] [PATCH v3 3/5] Makefile: convert "toolchain-eclipse-register" to a hook Fabio Porcedda
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 9+ messages in thread
From: Fabio Porcedda @ 2014-06-27 12:15 UTC (permalink / raw)
  To: buildroot

From: Fabio Porcedda <fabio.porcedda@gmail.com>

Convert "system.mk" recipes to "target-finalize" hooks in order to:
- Ensure an ordering even if top-level parallel make is being used.
- Execute "system.mk" commands after the "target-finalize" initial message
  is printed so they can be clearly distinguished from packages
  building.

Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
---

Notes:
    v3:
     - Shortened hooks names: SYSTEM_GENERIC_* -> SYSTEM_*
     - use a common name for hooks variants: SYSTEM_REMOUNT_RW &
       SYSTEM_GETTY (Arnout)
    
    v2:
     - use hooks

 system/system.mk | 80 ++++++++++++++++++++++++++++++--------------------------
 1 file changed, 43 insertions(+), 37 deletions(-)

diff --git a/system/system.mk b/system/system.mk
index 01a6c3a..b614615 100644
--- a/system/system.mk
+++ b/system/system.mk
@@ -7,68 +7,74 @@ TARGET_GENERIC_GETTY_BAUDRATE = $(call qstrip,$(BR2_TARGET_GENERIC_GETTY_BAUDRAT
 TARGET_GENERIC_GETTY_TERM = $(call qstrip,$(BR2_TARGET_GENERIC_GETTY_TERM))
 TARGET_GENERIC_GETTY_OPTIONS = $(call qstrip,$(BR2_TARGET_GENERIC_GETTY_OPTIONS))
 
-target-generic-securetty:
+ifeq ($(BR2_TARGET_GENERIC_GETTY),y)
+define SYSTEM_SECURETTY
 	grep -q '^$(TARGET_GENERIC_GETTY_PORT)$$' $(TARGET_DIR)/etc/securetty || \
 		echo '$(TARGET_GENERIC_GETTY_PORT)' >> $(TARGET_DIR)/etc/securetty
+endef
+TARGET_FINALIZE_HOOKS += SYSTEM_SECURETTY
+endif
 
-target-generic-hostname:
+ifneq ($(TARGET_GENERIC_HOSTNAME),)
+define SYSTEM_HOSTNAME
 	mkdir -p $(TARGET_DIR)/etc
 	echo "$(TARGET_GENERIC_HOSTNAME)" > $(TARGET_DIR)/etc/hostname
 	$(SED) '$$a \127.0.1.1\t$(TARGET_GENERIC_HOSTNAME)' \
 		-e '/^127.0.1.1/d' $(TARGET_DIR)/etc/hosts
+endef
+TARGET_FINALIZE_HOOKS += SYSTEM_HOSTNAME
+endif
 
-target-generic-issue:
+ifneq ($(TARGET_GENERIC_ISSUE),)
+define SYSTEM_ISSUE
 	mkdir -p $(TARGET_DIR)/etc
 	echo "$(TARGET_GENERIC_ISSUE)" > $(TARGET_DIR)/etc/issue
+endef
+TARGET_FINALIZE_HOOKS += SYSTEM_ISSUE
+endif
 
 ifneq ($(TARGET_GENERIC_ROOT_PASSWD),)
-target-root-passwd: host-mkpasswd
+TARGETS += host-mkpasswd
 endif
-target-root-passwd:
+
+ifeq ($(BR2_ROOTFS_SKELETON_DEFAULT),y)
+
+define SYSTEM_ROOT_PASSWD
 	[ -n "$(TARGET_GENERIC_ROOT_PASSWD)" ] && \
 		TARGET_GENERIC_ROOT_PASSWD_HASH=$$($(MKPASSWD) -m "$(TARGET_GENERIC_PASSWD_METHOD)" "$(TARGET_GENERIC_ROOT_PASSWD)"); \
 	$(SED) "s,^root:[^:]*:,root:$$TARGET_GENERIC_ROOT_PASSWD_HASH:," $(TARGET_DIR)/etc/shadow
+endef
+TARGET_FINALIZE_HOOKS += SYSTEM_ROOT_PASSWD
 
-target-generic-getty-busybox:
-	$(SED) '/# GENERIC_SERIAL$$/s~^.*#~$(TARGET_GENERIC_GETTY_PORT)::respawn:/sbin/getty -L $(TARGET_GENERIC_GETTY_OPTIONS) $(TARGET_GENERIC_GETTY_PORT) $(TARGET_GENERIC_GETTY_BAUDRATE) $(TARGET_GENERIC_GETTY_TERM) #~' \
-		$(TARGET_DIR)/etc/inittab
-
+ifeq ($(BR2_TARGET_GENERIC_GETTY),y)
+ifeq ($(BR2_PACKAGE_SYSVINIT),y)
 # In sysvinit inittab, the "id" must not be longer than 4 bytes, so we
 # skip the "tty" part and keep only the remaining.
-target-generic-getty-sysvinit:
+define SYSTEM_GETTY
 	$(SED) '/# GENERIC_SERIAL$$/s~^.*#~$(shell echo $(TARGET_GENERIC_GETTY_PORT) | tail -c+4)::respawn:/sbin/getty -L $(TARGET_GENERIC_GETTY_OPTIONS) $(TARGET_GENERIC_GETTY_PORT) $(TARGET_GENERIC_GETTY_BAUDRATE) $(TARGET_GENERIC_GETTY_TERM) #~' \
 		$(TARGET_DIR)/etc/inittab
+endef
+else
+# Add getty to busybox inittab
+define SYSTEM_GETTY
+	$(SED) '/# GENERIC_SERIAL$$/s~^.*#~$(TARGET_GENERIC_GETTY_PORT)::respawn:/sbin/getty -L $(TARGET_GENERIC_GETTY_OPTIONS) $(TARGET_GENERIC_GETTY_PORT) $(TARGET_GENERIC_GETTY_BAUDRATE) $(TARGET_GENERIC_GETTY_TERM) #~' \
+		$(TARGET_DIR)/etc/inittab
+endef
+endif
+TARGET_FINALIZE_HOOKS += SYSTEM_GETTY
+endif
 
+ifeq ($(BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW),y)
 # Find commented line, if any, and remove leading '#'s
-target-generic-do-remount-rw:
+define SYSTEM_REMOUNT_RW
 	$(SED) '/^#.*# REMOUNT_ROOTFS_RW$$/s~^#\+~~' $(TARGET_DIR)/etc/inittab
-
+endef
+else
 # Find uncommented line, if any, and add a leading '#'
-target-generic-dont-remount-rw:
+define SYSTEM_REMOUNT_RW
 	$(SED) '/^[^#].*# REMOUNT_ROOTFS_RW$$/s~^~#~' $(TARGET_DIR)/etc/inittab
-
-ifeq ($(BR2_TARGET_GENERIC_GETTY),y)
-TARGETS += target-generic-securetty
-endif
-
-ifneq ($(TARGET_GENERIC_HOSTNAME),)
-TARGETS += target-generic-hostname
-endif
-
-ifneq ($(TARGET_GENERIC_ISSUE),)
-TARGETS += target-generic-issue
+endef
 endif
+TARGET_FINALIZE_HOOKS += SYSTEM_REMOUNT_RW
 
-ifeq ($(BR2_ROOTFS_SKELETON_DEFAULT),y)
-TARGETS += target-root-passwd
-
-ifeq ($(BR2_TARGET_GENERIC_GETTY),y)
-TARGETS += target-generic-getty-$(if $(BR2_PACKAGE_SYSVINIT),sysvinit,busybox)
-endif
-
-ifeq ($(BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW),y)
-TARGETS += target-generic-do-remount-rw
-else
-TARGETS += target-generic-dont-remount-rw
-endif
-endif
+endif # BR2_ROOTFS_SKELETON_DEFAULT
-- 
2.0.0

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

* [Buildroot] [PATCH v3 3/5] Makefile: convert "toolchain-eclipse-register" to a hook
  2014-06-27 12:15 [Buildroot] [PATCH v3 0/5] Add TARGET_FINALIZE_HOOKS Fabio Porcedda
  2014-06-27 12:15 ` [Buildroot] [PATCH v3 1/5] Makefile: target-finalize: add TARGET_FINALIZE_HOOKS Fabio Porcedda
  2014-06-27 12:15 ` [Buildroot] [PATCH v3 2/5] system: convert "system.mk" recipes to "target-finalize" hooks Fabio Porcedda
@ 2014-06-27 12:15 ` Fabio Porcedda
  2014-06-27 12:15 ` [Buildroot] [PATCH v3 4/5] Makefile: convert "target-generatelocales" " Fabio Porcedda
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Fabio Porcedda @ 2014-06-27 12:15 UTC (permalink / raw)
  To: buildroot

For consinstency sake convert the "toolchain-eclipse-register" to a
TARGET_FINALIZE_HOOKS hook.

Signed-off-by: Fabio Porcedda <fabio.porcedda@telit.com>
---

Notes:
    v3:
     - add this patch (Arnout)

 Makefile | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/Makefile b/Makefile
index 3e845f6..c790f7a 100644
--- a/Makefile
+++ b/Makefile
@@ -396,10 +396,6 @@ TARGETS += target-generatelocales
 endif
 endif
 
-ifeq ($(BR2_ECLIPSE_REGISTER),y)
-TARGETS += toolchain-eclipse-register
-endif
-
 TARGETS_SOURCE := $(patsubst %,%-source,$(TARGETS))
 TARGETS_DIRCLEAN := $(patsubst %,%-dirclean,$(TARGETS))
 
@@ -509,6 +505,14 @@ STRIP_FIND_CMD += -type f \( -perm /111 -o -name '*.so*' \)
 #   done for kernel modules with incorrect permissions.
 STRIP_FIND_CMD += -not \( $(call findfileclauses,libpthread*.so* *.ko $(call qstrip,$(BR2_STRIP_EXCLUDE_FILES))) \) -print
 
+ifeq ($(BR2_ECLIPSE_REGISTER),y)
+define TOOLCHAIN_ECLIPSE_REGISTER
+	./support/scripts/eclipse-register-toolchain `readlink -f $(O)` \
+		$(notdir $(TARGET_CROSS)) $(BR2_ARCH)
+endef
+TARGET_FINALIZE_HOOKS += TOOLCHAIN_ECLIPSE_REGISTER
+endif
+
 ifeq ($(BR2_ENABLE_LOCALE_PURGE),y)
 LOCALE_WHITELIST = $(BUILD_DIR)/locales.nopurge
 LOCALE_NOPURGE = $(call qstrip,$(BR2_ENABLE_LOCALE_WHITELIST))
@@ -628,9 +632,6 @@ target-post-image: $(TARGETS_ROOTFS) target-finalize
 		$(call MESSAGE,"Executing post-image script $(s)"); \
 		$(EXTRA_ENV) $(s) $(BINARIES_DIR) $(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS))$(sep))
 
-toolchain-eclipse-register: toolchain
-	./support/scripts/eclipse-register-toolchain `readlink -f $(O)` $(notdir $(TARGET_CROSS)) $(BR2_ARCH)
-
 source: $(TARGETS_SOURCE) $(HOST_SOURCE)
 
 external-deps:
-- 
2.0.0

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

* [Buildroot] [PATCH v3 4/5] Makefile: convert "target-generatelocales" to a hook
  2014-06-27 12:15 [Buildroot] [PATCH v3 0/5] Add TARGET_FINALIZE_HOOKS Fabio Porcedda
                   ` (2 preceding siblings ...)
  2014-06-27 12:15 ` [Buildroot] [PATCH v3 3/5] Makefile: convert "toolchain-eclipse-register" to a hook Fabio Porcedda
@ 2014-06-27 12:15 ` Fabio Porcedda
  2014-06-27 12:15 ` [Buildroot] [PATCH v3 5/5] Makefile: do not add to targets common dependencies Fabio Porcedda
  2014-06-29 14:55 ` [Buildroot] [PATCH v3 0/5] Add TARGET_FINALIZE_HOOKS Thomas Petazzoni
  5 siblings, 0 replies; 9+ messages in thread
From: Fabio Porcedda @ 2014-06-27 12:15 UTC (permalink / raw)
  To: buildroot

For consinstency sake convert the "target-generatelocales" rule to a
TARGET_FINALIZE_HOOKS hook.

Signed-off-by: Fabio Porcedda <fabio.porcedda@telit.com>
---

Notes:
    v3:
     - add this patch (Arnout)

 Makefile | 64 +++++++++++++++++++++++++++++++---------------------------------
 1 file changed, 31 insertions(+), 33 deletions(-)

diff --git a/Makefile b/Makefile
index c790f7a..95ad1f4 100644
--- a/Makefile
+++ b/Makefile
@@ -324,9 +324,6 @@ HOST_DIR := $(call qstrip,$(BR2_HOST_DIR))
 # Quotes are needed for spaces and all in the original PATH content.
 BR_PATH = "$(HOST_DIR)/bin:$(HOST_DIR)/sbin:$(HOST_DIR)/usr/bin:$(HOST_DIR)/usr/sbin:$(PATH)"
 
-# locales to generate
-GENERATE_LOCALE = $(call qstrip,$(BR2_GENERATE_LOCALE))
-
 TARGET_SKELETON = $(TOPDIR)/system/skeleton
 
 # Location of a file giving a big fat warning that output/target
@@ -390,12 +387,6 @@ include fs/common.mk
 
 include $(BR2_EXTERNAL)/external.mk
 
-ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),y)
-ifneq ($(GENERATE_LOCALE),)
-TARGETS += target-generatelocales
-endif
-endif
-
 TARGETS_SOURCE := $(patsubst %,%-source,$(TARGETS))
 TARGETS_DIRCLEAN := $(patsubst %,%-dirclean,$(TARGETS))
 
@@ -513,6 +504,37 @@ endef
 TARGET_FINALIZE_HOOKS += TOOLCHAIN_ECLIPSE_REGISTER
 endif
 
+# Generate locale data. Basically, we call the localedef program
+# (built by the host-localedef package) for each locale. The input
+# data comes preferably from the toolchain, or if the toolchain does
+# not have them (Linaro toolchains), we use the ones available on the
+# host machine.
+ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),y)
+GENERATE_LOCALE = $(call qstrip,$(BR2_GENERATE_LOCALE))
+ifneq ($(GENERATE_LOCALE),)
+TARGETS += host-localedef
+
+define GENERATE_LOCALES
+	$(Q)mkdir -p $(TARGET_DIR)/usr/lib/locale/
+	$(Q)for locale in $(GENERATE_LOCALE) ; do \
+		inputfile=`echo $${locale} | cut -f1 -d'.'` ; \
+		charmap=`echo $${locale} | cut -f2 -d'.' -s` ; \
+		if test -z "$${charmap}" ; then \
+			charmap="UTF-8" ; \
+		fi ; \
+		echo "Generating locale $${inputfile}.$${charmap}" ; \
+		I18NPATH=$(STAGING_DIR)/usr/share/i18n:/usr/share/i18n \
+		$(HOST_DIR)/usr/bin/localedef \
+			--prefix=$(TARGET_DIR) \
+			--$(call LOWERCASE,$(BR2_ENDIAN))-endian \
+			-i $${inputfile} -f $${charmap} \
+			$${locale} ; \
+	done
+endef
+TARGET_FINALIZE_HOOKS += GENERATE_LOCALES
+endif
+endif
+
 ifeq ($(BR2_ENABLE_LOCALE_PURGE),y)
 LOCALE_WHITELIST = $(BUILD_DIR)/locales.nopurge
 LOCALE_NOPURGE = $(call qstrip,$(BR2_ENABLE_LOCALE_WHITELIST))
@@ -603,30 +625,6 @@ endif
 		$(call MESSAGE,"Executing post-build script $(s)"); \
 		$(EXTRA_ENV) $(s) $(TARGET_DIR) $(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS))$(sep))
 
-ifneq ($(GENERATE_LOCALE),)
-# Generate locale data. Basically, we call the localedef program
-# (built by the host-localedef package) for each locale. The input
-# data comes preferably from the toolchain, or if the toolchain does
-# not have them (Linaro toolchains), we use the ones available on the
-# host machine.
-target-generatelocales: host-localedef toolchain
-	$(Q)mkdir -p $(TARGET_DIR)/usr/lib/locale/
-	$(Q)for locale in $(GENERATE_LOCALE) ; do \
-		inputfile=`echo $${locale} | cut -f1 -d'.'` ; \
-		charmap=`echo $${locale} | cut -f2 -d'.' -s` ; \
-		if test -z "$${charmap}" ; then \
-			charmap="UTF-8" ; \
-		fi ; \
-		echo "Generating locale $${inputfile}.$${charmap}" ; \
-		I18NPATH=$(STAGING_DIR)/usr/share/i18n:/usr/share/i18n \
-		$(HOST_DIR)/usr/bin/localedef \
-			--prefix=$(TARGET_DIR) \
-			--$(call LOWERCASE,$(BR2_ENDIAN))-endian \
-			-i $${inputfile} -f $${charmap} \
-			$${locale} ; \
-	done
-endif
-
 target-post-image: $(TARGETS_ROOTFS) target-finalize
 	@$(foreach s, $(call qstrip,$(BR2_ROOTFS_POST_IMAGE_SCRIPT)), \
 		$(call MESSAGE,"Executing post-image script $(s)"); \
-- 
2.0.0

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

* [Buildroot] [PATCH v3 5/5] Makefile: do not add to targets common dependencies
  2014-06-27 12:15 [Buildroot] [PATCH v3 0/5] Add TARGET_FINALIZE_HOOKS Fabio Porcedda
                   ` (3 preceding siblings ...)
  2014-06-27 12:15 ` [Buildroot] [PATCH v3 4/5] Makefile: convert "target-generatelocales" " Fabio Porcedda
@ 2014-06-27 12:15 ` Fabio Porcedda
  2014-06-29 14:55 ` [Buildroot] [PATCH v3 0/5] Add TARGET_FINALIZE_HOOKS Thomas Petazzoni
  5 siblings, 0 replies; 9+ messages in thread
From: Fabio Porcedda @ 2014-06-27 12:15 UTC (permalink / raw)
  To: buildroot

From: Fabio Porcedda <fabio.porcedda@gmail.com>

Remove the rule that adds common dependencies to every target in the
"TARGETS" variable, because all those targets are packages that use the
package infrastructure or they depend on targets that use the package
infrastructure. The package infrastructure already adds common
dependencies.  Therefore, this rule is useless.

Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
---

Notes:
    v3:
     - improved the description (Arnout)

 Makefile | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/Makefile b/Makefile
index 95ad1f4..4f8f00f 100644
--- a/Makefile
+++ b/Makefile
@@ -420,10 +420,6 @@ $(BUILD_DIR)/buildroot-config/auto.conf: $(BR2_CONFIG)
 
 prepare: $(BUILD_DIR)/buildroot-config/auto.conf
 
-# Add base dependencies to all targets even on those not based on the
-# package framework.
-$(TARGETS): dirs prepare dependencies
-
 world: target-post-image
 
 .PHONY: all world toolchain dirs clean distclean source outputmakefile \
-- 
2.0.0

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

* [Buildroot] [PATCH v3 0/5] Add TARGET_FINALIZE_HOOKS
  2014-06-27 12:15 [Buildroot] [PATCH v3 0/5] Add TARGET_FINALIZE_HOOKS Fabio Porcedda
                   ` (4 preceding siblings ...)
  2014-06-27 12:15 ` [Buildroot] [PATCH v3 5/5] Makefile: do not add to targets common dependencies Fabio Porcedda
@ 2014-06-29 14:55 ` Thomas Petazzoni
  5 siblings, 0 replies; 9+ messages in thread
From: Thomas Petazzoni @ 2014-06-29 14:55 UTC (permalink / raw)
  To: buildroot

Dear Fabio Porcedda,

On Fri, 27 Jun 2014 14:15:54 +0200, Fabio Porcedda wrote:
> This patch set add TARGET_FINALIZE_HOOKS and use it for system.mk
> recipies.
> 
> The changelog is on each patch.
> 
> Best regards
> Fabio Porcedda (5):
>   Makefile: target-finalize: add TARGET_FINALIZE_HOOKS
>   system: convert "system.mk" recipes to "target-finalize" hooks
>   Makefile: convert "toolchain-eclipse-register" to a hook
>   Makefile: convert "target-generatelocales" to a hook
>   Makefile: do not add to targets common dependencies

Thanks, series applied. I just have one comment on PATCH 2, which I'll
make as a reply to the patch.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH v3 2/5] system: convert "system.mk" recipes to "target-finalize" hooks
  2014-06-27 12:15 ` [Buildroot] [PATCH v3 2/5] system: convert "system.mk" recipes to "target-finalize" hooks Fabio Porcedda
@ 2014-06-29 14:56   ` Thomas Petazzoni
  2014-07-04  9:36     ` Fabio Porcedda
  0 siblings, 1 reply; 9+ messages in thread
From: Thomas Petazzoni @ 2014-06-29 14:56 UTC (permalink / raw)
  To: buildroot

Dear Fabio Porcedda,

On Fri, 27 Jun 2014 14:15:56 +0200, Fabio Porcedda wrote:

>  ifneq ($(TARGET_GENERIC_ROOT_PASSWD),)
> -target-root-passwd: host-mkpasswd
> +TARGETS += host-mkpasswd

Actually, I was wondering how this could work in the context of
top-level parallel build, but looking more closely, target-finalize has
$(TARGETS) in its dependencies, so we indeed have the guarantee that
host-mkpasswd will be built before the SYSTEM_ROOT_PASSWD hook is
executed.

So in fact, I don't have any comment about PATCH 2 :-)

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH v3 2/5] system: convert "system.mk" recipes to "target-finalize" hooks
  2014-06-29 14:56   ` Thomas Petazzoni
@ 2014-07-04  9:36     ` Fabio Porcedda
  0 siblings, 0 replies; 9+ messages in thread
From: Fabio Porcedda @ 2014-07-04  9:36 UTC (permalink / raw)
  To: buildroot

On Sun, Jun 29, 2014 at 4:56 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Dear Fabio Porcedda,
>
> On Fri, 27 Jun 2014 14:15:56 +0200, Fabio Porcedda wrote:
>
>>  ifneq ($(TARGET_GENERIC_ROOT_PASSWD),)
>> -target-root-passwd: host-mkpasswd
>> +TARGETS += host-mkpasswd
>
> Actually, I was wondering how this could work in the context of
> top-level parallel build, but looking more closely, target-finalize has
> $(TARGETS) in its dependencies, so we indeed have the guarantee that
> host-mkpasswd will be built before the SYSTEM_ROOT_PASSWD hook is
> executed.
>
> So in fact, I don't have any comment about PATCH 2 :-)

Yes, it's exactly as you said.

Adding a dependency to TARGETS it's like adding to an hypothetical
TARGET_FINALIZE_DEPENDENCIES variable.

BR
-- 
Fabio Porcedda

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

end of thread, other threads:[~2014-07-04  9:36 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-27 12:15 [Buildroot] [PATCH v3 0/5] Add TARGET_FINALIZE_HOOKS Fabio Porcedda
2014-06-27 12:15 ` [Buildroot] [PATCH v3 1/5] Makefile: target-finalize: add TARGET_FINALIZE_HOOKS Fabio Porcedda
2014-06-27 12:15 ` [Buildroot] [PATCH v3 2/5] system: convert "system.mk" recipes to "target-finalize" hooks Fabio Porcedda
2014-06-29 14:56   ` Thomas Petazzoni
2014-07-04  9:36     ` Fabio Porcedda
2014-06-27 12:15 ` [Buildroot] [PATCH v3 3/5] Makefile: convert "toolchain-eclipse-register" to a hook Fabio Porcedda
2014-06-27 12:15 ` [Buildroot] [PATCH v3 4/5] Makefile: convert "target-generatelocales" " Fabio Porcedda
2014-06-27 12:15 ` [Buildroot] [PATCH v3 5/5] Makefile: do not add to targets common dependencies Fabio Porcedda
2014-06-29 14:55 ` [Buildroot] [PATCH v3 0/5] Add TARGET_FINALIZE_HOOKS Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.