On Tue, Mar 22, 2011 at 3:41 PM, Bruno Haible <br...@clisp.org> wrote: > Simon Josefsson wrote: >> I didn't know why a >> certain module was pulled in, and it wasn't immediately clear from the >> modules I requested. A different way to resolve this problem could be >> with a 'gnulib-tool --why strdup' command that could print: >> >> uniconv/u8-strconv-from-locale >> uniconv/u8-strconv-from-enc >> uniconv/u8-conv-from-enc >> striconveha >> strdup >> >> with the first line being something I manually requested. >> >> Just an idea, it might be too much work to implement this logic in shell >> script. There is complexity because there may be multiple paths too, >> although I think naming only one would be sufficient. > > I think, on the contrary, it would be essential to show all paths, > otherwise the user does work to cut a dependency and then afterwards notices > that there are other paths to the particular dependency that are much > harder to cut. > > All this is in the area of graph display, where the graph is a Directed > Acyclic Graph and 'gnulib-tool --extract-dependencies' provides the links > between nodes. I won't have time to plunge into this; volunteers welcome.
the attached shell script seems to work, though it WILL create a ton of .dot files in your gnulib directory!!! the interesting ones are fullgraph-$module.dot. gnulib.dot is just too big of a graph to do much anything with its possible i'm missing some modules due to the use of basename $module, might need to escape those instead. anyhow, the outputted files should be suitable for running with dotty or dot from graphviz.
dot.sh
Description: Bourne shell script