Hello there,

Le mardi 15 février 2011 à 00:28 -0600, Jonathan Nieder a écrit : 
> Hi Martin,
> 
> Martin Quinson wrote:
> 
> > And I'm reopening it and retitle it, to ask "make" the needed support in
> > that task. I would like a way to list all dependencies and subdependencies
> > of a given target to avoid the recursive shell function hackism I currently
> > have to do when using "make -pnq". 
> 
> I somewhat like this idea, though I imagine there are complications.
> Perhaps a tool to build a graph of dependencies from a makefile would
> be enough?

Well. I don't think that rewriting as a separate tool the part of make
that parses the Makefile and builds the dag is a good idea. That code
seems error-prone to me, and if you do so, you'll have to maintain your
code afterward. 

Obviously, adding this to make should not complicate make very much:
it's just like dumping an information that make already has in memory,
and it solves the issue of the maintainability of the parser: make
maintainers already take care of the parser.

> I am not sure why the earlier conversation on that went sour so fast.

>From my understanding, no upstream make maintainer ever answered to that
feature request, but "someone" interfered in the communication by giving
strong advices about something he was not really entitled to speak
about. The cathedral, the bazaar and the municipal council... 

> I think something more easily machine-readable than -pnq (e.g.,
> dependencies only) sounds valuable, so if you come up with a spec for
> that I'd be glad to take a look (maybe to refine it, or maybe to help
> implement it).

For each target of the file, print:
$(target): the complete list of all dependencies, including dependencies
of dependencies, and dep of dep of dep of dep, and ...

If we are by designing the feature, you could also have make listing all
(recursive) dependencies of a given target instead of listing them of
every target of the file.

Does it sound reasonable?
Mt.




-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to