[Buildroot] [PATCH 2/4] pkg-infra: add hook to log timing of steps

Yann E. MORIN yann.morin.1998 at free.fr
Sun Oct 13 23:11:26 UTC 2013


From: "Yann E. MORIN" <yann.morin.1998 at free.fr>

Signed-off-by: "Yann E. MORIN" <yann.morin.1998 at free.fr>
---
 package/pkg-generic.mk | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index c4c7f8a..162c9ed 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -36,6 +36,12 @@ define step_end
 	$(foreach hook,$(STEP_HOOKS),$(call $(hook),end,$(1));)
 endef
 
+# Time steps
+define step_time
+	printf "%s:%-5.5s:%-20.20s: %s\n" "$$(date +%s)" "$(1)" "$(2)" "$($(PKG)_NAME)" >>"$(BUILD_DIR)/build.log"
+endef
+STEP_HOOKS += step_time
+
 ################################################################################
 # Implicit targets -- produce a stamp file for each step of a package build
 ################################################################################
-- 
1.8.1.2




More information about the buildroot mailing list