build: log time taken by each packages/steps
[oweals/openwrt.git] / include / subdir.mk
index 79a80528aef31528b696d133fa817b6970b4dd9b..ed4f7537d5c746b00b586a49ff89004895eaec21 100644 (file)
@@ -43,6 +43,7 @@ log_make = \
         $(if $(BUILD_LOG), \
                set -o pipefail; \
                mkdir -p $(BUILD_LOG_DIR)/$(1)$(if $(4),/$(4));) \
+       gtime -f "time: $(1)$(if $(4),/$(4))/$(if $(3),$(3)-)$(2)\#%U\#%S\#%e" -- \
        $$(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)