bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #19108] Pattern rules with multiple target patterns do not honor th


From: Christoph Schulz
Subject: [bug #19108] Pattern rules with multiple target patterns do not honor the dependencies of all targets correctly
Date: Thu, 24 May 2007 22:32:39 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.0.11) Gecko/20070312 Firefox/1.5.0.11

Follow-up Comment #2, bug #19108 (project make):

Hello Krzysztof!

> [...] so it calls your rules to build x.tgt1 ONLY

Yes, but this behaviour is not correct. Currently, pattern rules with
multiple target patterns are the *only* way to specify that a tool is
generating multiple output files *at once*. This is clearly stated in the
documentation (see 10.5.1). So GNU make already knows that executing the
pattern rule will generate *all* the targets of that rule, not only the
target GNU make wants to update. Consequently, GNU make should consider that
and ensure that the prerequisites of all the other targets that are also
created (unavoidably) by the pattern rule are built before the rule is
executed. Currently, this is not done, and although this behaviour is
documented, I don't think it is correct.

> However this single rule should NOT generate both files at
> once.

That's what pattern rules with multiple target patterns are for, see 10.5.1.

> My belief is that no rule should make more targets then make
> wants.

Yes, but if you use a pattern rule with multiple target patterns, this
situation is *unavoidable*, as the command being executed cannot be forced to
create only a subset of its output files in general. (My example is, of
course, only a simplification of a more complex real-world situation.)

Regards,
  Christoph Schulz


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?19108>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]