The idea is to easily get the list of packages taking the most time to build,
and see if we can improve them

Sending as RFC as this is a quick hack that might break in some case (different 
implementation of time)

Signed-off-by: Etienne Champetier <champetier.etie...@gmail.com>
---
 include/subdir.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/subdir.mk b/include/subdir.mk
index 79a80528ae..85d2daf1bd 100644
--- a/include/subdir.mk
+++ b/include/subdir.mk
@@ -42,7 +42,8 @@ log_make = \
         $(if $(call debug,$(1),v),,@)+ \
         $(if $(BUILD_LOG), \
                set -o pipefail; \
-               mkdir -p $(BUILD_LOG_DIR)/$(1)$(if $(4),/$(4));) \
+               mkdir -p $(BUILD_LOG_DIR)/$(1)$(if $(4),/$(4)); \
+               /usr/bin/time -f $(1)$(if $(4),/$(4))/$(if 
$(3),$(3)-)$(2)\#\#%U\#%S\#%e -a -o $(BUILD_LOG_DIR)/time.txt -- ) \
        $$(SUBMAKE) $(subdir_make_opts) $(if $(3),$(3)-)$(2) \
                $(if $(BUILD_LOG),SILENT= 2>&1 | tee $(BUILD_LOG_DIR)/$(1)$(if 
$(4),/$(4))/$(if $(3),$(3)-)$(2).txt)
 
-- 
2.14.3


_______________________________________________
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev

Reply via email to