All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] core: add rule to dump packages' build order
@ 2017-04-02 13:03 Yann E. MORIN
  2017-04-03 10:10 ` Arnout Vandecappelle
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Yann E. MORIN @ 2017-04-02 13:03 UTC (permalink / raw)
  To: buildroot

When debugging hidden dependencies, the build order is very important.
Most notably, it is interesting to identify potential culprits.

Add a new top-level rule, show-biuld-order, that dumps all the packages
in the order they would get built.

Note that there are a few differences with show-targets:

  - more packages are reported, becasue show-targets does not report
    host packages that have no prompt;

  - the output is line-based, because we're using $(info $(1)); getting
    a single output line like show-targets would require we use an
    actual command, like printf '%s ' $(1); but that takes a lot of
    time, while $(info $(1)) is almost instantaneous (the time to parse
    the Makefiles);

  - rootfs targets are not reported.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
Cc: Peter Korsgaard <peter@korsgaard.com>
---
 Makefile               | 2 ++
 package/pkg-generic.mk | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/Makefile b/Makefile
index 941bf78..919d589 100644
--- a/Makefile
+++ b/Makefile
@@ -757,6 +757,8 @@ legal-info: dirs legal-info-clean legal-info-prepare $(foreach p,$(PACKAGES),$(p
 show-targets:
 	@echo $(PACKAGES) $(TARGETS_ROOTFS)
 
+show-build-order: $(patsubst %,%-show-build-order,$(PACKAGES))
+
 graph-build: $(O)/build/build-time.log
 	@install -d $(GRAPHS_DIR)
 	$(foreach o,name build duration,./support/scripts/graph-build-time \
diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index 31dbc54..3b26e6b 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -737,6 +737,9 @@ $(1)-show-depends:
 $(1)-show-rdepends:
 			@echo $$($(2)_RDEPENDENCIES)
 
+$(1)-show-build-order: $$(patsubst %,%-show-build-order,$$($(2)_FINAL_ALL_DEPENDENCIES))
+	$$(info $(1))
+
 $(1)-graph-depends: graph-depends-requirements
 	$(call pkg-graph-depends,$(1),--direct)
 
-- 
2.9.3

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

end of thread, other threads:[~2017-04-13 22:18 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-02 13:03 [Buildroot] [PATCH] core: add rule to dump packages' build order Yann E. MORIN
2017-04-03 10:10 ` Arnout Vandecappelle
2017-04-04 18:59   ` Yann E. MORIN
2017-04-07 10:30     ` Arnout Vandecappelle
2017-04-07 10:43       ` Thomas Petazzoni
2017-04-07 11:11         ` Arnout Vandecappelle
2017-04-07 19:24       ` Yann E. MORIN
2017-04-07 19:44         ` Yann E. MORIN
2017-04-10  9:28         ` Arnout Vandecappelle
2017-04-10 11:44           ` Thomas Petazzoni
2017-04-13 22:18             ` Alexandre Belloni
2017-04-07 10:31 ` Arnout Vandecappelle
2017-04-11  9:23   ` Arnout Vandecappelle
2017-04-13 21:09 ` 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.