Graphing package dependencies
Hello,
Following the question asked by Will yesterday, I just went ahead and implement a small tool that generates a graph of dependencies for a given package.
The result of this tool for the libgtk2 package can be seen at
http://free-electrons.com/~thomas/libgtk2-package-dependencies.pdf
This is the kind of funny things we can do with a generic package infrastructure :-)
The implementation of this tool is available in my graph-dependencies branch at
http://git.buildroot.net/~tpetazzoni/git/buildroot/log/?h=graph-dependencies.
There are three commits in this branch:
* package: Add new <pkg>-show-depends to list dependencies
* package: optimize the implementation of UPPERCASE
* New graph-depends script
Regards,
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
Thomas> Hello,
Thomas> Following the question asked by Will yesterday, I just went ahead and Thomas> implement a small tool that generates a graph of dependencies for a Thomas> given package.
Thomas> The result of this tool for the libgtk2 package can be seen at
Thomas> http://free-electrons.com/~thomas/libgtk2-package-dependencies.pdf
Thomas> This is the kind of funny things we can do with a generic package Thomas> infrastructure :-)
Nice!
Thomas> * package: optimize the implementation of UPPERCASE
My eyes! ;)
We could instead do something like gmsl does (http://gmsl.sf.net):
az := a b c d e f g h i j k l m n o p q r s t u v w x y z . - AZ := A B C D E F G H I J K L M N O P Q R S T U V W X Y Z _ _
UPPERCASE = $(eval __tmp := $1) \
$(foreach c, $(join $(addsuffix :,$(az)),$(AZ)), \
$(eval __tmp := \
$(subst $(word 1,$(subst :, ,$c)),$(word 2,$(subst :, ,$c)),\
$(__tmp)))) \
$(__tmp)It loops through a character list of the form a:A b:B .., and substitutes the 1st charact for the second.
This is written as a generic tr function, we could ofcourse merge az and A-Z if we only ever want to do uppercase.
Signature · 1 line
Bye, Peter Korsgaard
Hello,
Quoted 3 lines · On Thu, 6 May 2010 10:14:37 +0200 Thomas Petazzoni…
Following the question asked by Will yesterday, I just went ahead and implement a small tool that generates a graph of dependencies for a given package.
I've slightly improved this script, and it is now capable of generating the dependency graph for a full Buildroot configuration, i.e taking into account all packages that have been selected.
See http://free-electrons.com/~thomas/buildroot-full-dependencies.pdf
for a fairly large example involving X.org and Gtk.
As always, the code is available in
http://git.buildroot.net/~tpetazzoni/git/buildroot/log/?h=graph-dependencies.
Besides the modifications in the script itself, the modifications in the rest of Buildroot are very small.
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
\o/ Wunderbar !
Quoted 32 lines · Thomas Petazzoni
Hello,
Quoted 3 lines · On Thu, 6 May 2010 10:14:37 +0200 Thomas Petazzoni…
Following the question asked by Will yesterday, I just went ahead and implement a small tool that generates a graph of dependencies for a given package.
I've slightly improved this script, and it is now capable of generating the dependency graph for a full Buildroot configuration, i.e taking into account all packages that have been selected.
See http://free-electrons.com/~thomas/buildroot-full-dependencies.pdf
for a fairly large example involving X.org and Gtk.As always, the code is available in
http://git.buildroot.net/~tpetazzoni/git/buildroot/log/?h=graph-dependencies.
Besides the modifications in the script itself, the modifications in the rest of Buildroot are very small.Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
Hi,
Thomas> I've slightly improved this script, and it is now capable of generating Thomas> the dependency graph for a full Buildroot configuration, i.e taking Thomas> into account all packages that have been selected.
Thomas> See http://free-electrons.com/~thomas/buildroot-full-dependencies.pdf
Thomas> for a fairly large example involving X.org and Gtk.
Thomas> As always, the code is available in
Thomas> http://git.buildroot.net/~tpetazzoni/git/buildroot/log/?h=graph-dependencies.
Thomas> Besides the modifications in the script itself, the modifications in Thomas> the rest of Buildroot are very small.
Great! Care to write a bit of documentation about it, then I'll pull it?
Signature · 1 line
Bye, Peter Korsgaard
Quoted 1 line · On Mon, 17 May 2010 08:46:06 +0200 Peter Korsgaard <[email protected]> wrote:
Great! Care to write a bit of documentation about it, then I'll pull it?
Sure, will do.
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com