All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] Makefile: include lifecycle scripts in build-time.log
@ 2025-05-27  4:21 mscdexdotexe via buildroot
  2025-05-30 19:55 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 2+ messages in thread
From: mscdexdotexe via buildroot @ 2025-05-27  4:21 UTC (permalink / raw)
  To: buildroot

This gives a more complete picture when using build-time.log
to determine what is taking the most time.

Signed-off-by: Brian White <mscdex@mscdex.net>
---
 Makefile | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index c14023fd98..3291af90b7 100644
--- a/Makefile
+++ b/Makefile
@@ -587,10 +587,12 @@ $(BUILD_DIR)/buildroot-config/auto.conf: $(BR2_CONFIG)
 prepare: $(BUILD_DIR)/buildroot-config/auto.conf
        @$(foreach s, $(call qstrip,$(BR2_ROOTFS_PRE_BUILD_SCRIPT)), \
                $(call MESSAGE,"Executing pre-build script $(s)"); \
+               $(call step_time,start,pre-build,$(s))$(sep) \
                $(EXTRA_ENV) $(s) \
                        $(TARGET_DIR) \
                        $(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS)) \
-                       $(call
qstrip,$(BR2_ROOTFS_PRE_BUILD_SCRIPT_ARGS))$(sep))
+                       $(call
qstrip,$(BR2_ROOTFS_PRE_BUILD_SCRIPT_ARGS))$(sep) \
+               $(call step_time,end,pre-build,$(s))$(sep))

 .PHONY: world
 world: target-post-image
@@ -807,10 +809,12 @@ endif # merged /usr

        $(foreach s, $(call qstrip,$(BR2_ROOTFS_POST_BUILD_SCRIPT)), \
                @$(call MESSAGE,"Executing post-build script $(s)")$(sep) \
+               @$(call step_time,start,post-build,$(s))$(sep) \
                $(Q)$(EXTRA_ENV) $(s) \
                        $(TARGET_DIR) \
                        $(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS)) \
-                       $(call
qstrip,$(BR2_ROOTFS_POST_BUILD_SCRIPT_ARGS))$(sep))
+                       $(call
qstrip,$(BR2_ROOTFS_POST_BUILD_SCRIPT_ARGS))$(sep) \
+               @$(call step_time,end,post-build,$(s))$(sep))

        touch $(TARGET_DIR)/usr

@@ -828,10 +832,12 @@ target-post-image: $(TARGETS_ROOTFS)
target-finalize staging-finalize
        $(Q)mkdir -p $(BINARIES_DIR)
        @$(foreach s, $(call qstrip,$(BR2_ROOTFS_POST_IMAGE_SCRIPT)), \
                $(call MESSAGE,"Executing post-image script $(s)"); \
+               $(call step_time,start,post-image,$(s))$(sep) \
                $(EXTRA_ENV) $(s) \
                        $(BINARIES_DIR) \
                        $(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS)) \
-                       $(call
qstrip,$(BR2_ROOTFS_POST_IMAGE_SCRIPT_ARGS))$(sep))
+                       $(call
qstrip,$(BR2_ROOTFS_POST_IMAGE_SCRIPT_ARGS))$(sep) \
+               $(call step_time,end,post-image,$(s))$(sep))

 .PHONY: source
 source: $(foreach p,$(PACKAGES),$(p)-all-source)
-- 
2.43.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2025-05-30 19:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-27  4:21 [Buildroot] [PATCH 1/1] Makefile: include lifecycle scripts in build-time.log mscdexdotexe via buildroot
2025-05-30 19:55 ` Thomas Petazzoni via buildroot

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.