* [Buildroot] [git commit] Makefile: expose 'graph-depends' to generate a graph of the dependency tree
@ 2013-12-29 11:13 Thomas Petazzoni
2014-01-07 0:37 ` Thomas Petazzoni
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2013-12-29 11:13 UTC (permalink / raw)
To: buildroot
commit: http://git.buildroot.net/buildroot/commit/?id=0cfe3ab88c6e1410ca719801147b1ba566c86d0d
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master
Generate the graph of the complete dependency tree by calling:
make graph-depends
It's also possible to generate the graph-depends for a single package:
make PKG-graph-depends
The graphs are generated in $(O)/graphs/
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
Makefile | 7 +++++++
package/pkg-generic.mk | 5 +++++
2 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile
index 98ca798..8107865 100644
--- a/Makefile
+++ b/Makefile
@@ -642,6 +642,11 @@ graph-build: $(O)/build/build-time.log
--output=$(O)/graphs/build.pie-$(t).pdf \
$(if $(GRAPH_ALT),--alternate-colors)$(sep))
+graph-depends:
+ @$(INSTALL) -d $(O)/graphs
+ @./support/scripts/graph-depends \
+ |dot -Tpdf -o $(O)/graphs/$(@).pdf
+
else # ifeq ($(BR2_HAVE_DOT_CONFIG),y)
all: menuconfig
@@ -814,6 +819,7 @@ help:
@echo ' toolchain - build toolchain'
@echo ' <package>-rebuild - force recompile <package>'
@echo ' <package>-reconfigure - force reconfigure <package>'
+ @echo ' <package>-graph-depends - generate graph of the dependency tree for package'
@echo
@echo 'Configuration:'
@echo ' menuconfig - interactive curses-based configurator'
@@ -855,6 +861,7 @@ endif
@echo ' manual-text - build manual in text'
@echo ' manual-epub - build manual in ePub'
@echo ' graph-build - generate graphs of the build times'
+ @echo ' graph-depends - generate graph of the dependency tree'
@echo
@echo 'Miscellaneous:'
@echo ' source - download all sources needed for offline-build'
diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index 66034ba..8005ce9 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -468,6 +468,11 @@ endif
$(1)-show-depends:
@echo $$($(2)_DEPENDENCIES)
+$(1)-graph-depends:
+ @$(INSTALL) -d $(O)/graphs
+ @./support/scripts/graph-depends $(1) \
+ |dot -Tpdf -o $(O)/graphs/$$(@).pdf
+
$(1)-dirclean: $$($(2)_TARGET_DIRCLEAN)
$(1)-clean-for-rebuild:
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [git commit] Makefile: expose 'graph-depends' to generate a graph of the dependency tree
2013-12-29 11:13 [Buildroot] [git commit] Makefile: expose 'graph-depends' to generate a graph of the dependency tree Thomas Petazzoni
@ 2014-01-07 0:37 ` Thomas Petazzoni
2014-01-07 18:08 ` Yann E. MORIN
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2014-01-07 0:37 UTC (permalink / raw)
To: buildroot
Yann,
On Sun, 29 Dec 2013 12:13:19 +0100, Thomas Petazzoni wrote:
> Generate the graph of the complete dependency tree by calling:
> make graph-depends
>
> It's also possible to generate the graph-depends for a single package:
> make PKG-graph-depends
I just tested this in an out-of-tree situation... and it doesn't work.
It generates the dependency graph of the configuration that is in the
Buildroot source tree (I happened to have one) and not the one of the
Buildroot build tree.
To reproduce:
cd buildroot-sources/
make menuconfig
# create some configuration 1
mkdir ../buildroot-build
cd ../buildroot-build
make -C ../buildroot-sources O=$(pwd) menuconfig
# create some configuration 2
make graph-depends
The generated graph will correspond to "configuration 1" and not the
expected "configuration 2".
I suspect it's a problem in the graph-depends script itself rather than
the integration you made, but I haven't looked in detail.
Cheers,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [git commit] Makefile: expose 'graph-depends' to generate a graph of the dependency tree
2014-01-07 0:37 ` Thomas Petazzoni
@ 2014-01-07 18:08 ` Yann E. MORIN
0 siblings, 0 replies; 3+ messages in thread
From: Yann E. MORIN @ 2014-01-07 18:08 UTC (permalink / raw)
To: buildroot
Thomas, All,
On 2014-01-07 08:37 +0800, Thomas Petazzoni spake thusly:
> On Sun, 29 Dec 2013 12:13:19 +0100, Thomas Petazzoni wrote:
>
> > Generate the graph of the complete dependency tree by calling:
> > make graph-depends
> >
> > It's also possible to generate the graph-depends for a single package:
> > make PKG-graph-depends
>
> I just tested this in an out-of-tree situation... and it doesn't work.
> It generates the dependency graph of the configuration that is in the
> Buildroot source tree (I happened to have one) and not the one of the
> Buildroot build tree.
It is evven broken when there is no configuration in the Buildroot
source tree.
I'll see what I can do...
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-01-07 18:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-29 11:13 [Buildroot] [git commit] Makefile: expose 'graph-depends' to generate a graph of the dependency tree Thomas Petazzoni
2014-01-07 0:37 ` Thomas Petazzoni
2014-01-07 18:08 ` Yann E. MORIN
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox