Martin Quinson wrote:
> Le mardi 15 février 2011 à 00:28 -0600, Jonathan Nieder a écrit :
>> 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?
Sorry for the slow response. Yes, it sounds somewhat reasonable. The
remaining questions from my pov are mostly related to pattern rules:
- what happens when a target can be built multiple ways?
%.foo: %.bar
...
%.foo: %.baz
...
- what happens when the prerequisites to build a target are missing?
- what happens when a makefile uses the "include" construct to
include another makefile which is missing or not up to date?
- should the construct
foo:
+$(MAKE) bar
be treated as a dependency? (I'd think "no", but just making sure.)
- should constructs like
var := $(shell some-complicated-command)
foo: $(var)
be respected? Is it okay for the command that lists dependencies to
be somewhat unsafe?
My hunches are "hmm, not sure", "include them anyway", "error out, or
maybe build it", "no", and "yes; yes", for what it's worth.
Jonathan
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]