make - Support: sr #104348, Commands that update more than one...
You are not allowed to post comments on this tracker with your current authentication level.
sr #104348: Commands that update more than one target
Submitter: | None | ||
Submitted: | Tue 21 Jun 2005 11:02:48 PM UTC | ||
Category: | None | Priority: | 5 - Normal |
Severity: | 3 - Normal | Status: | None |
Privacy: | Public | Assigned to: | None |
Originator Email: | -email is unavailable- | Open/Closed: | Open |
Operating System: | None |
Wed 21 Jun 2006 08:39:49 PM UTC, comment #1: |
Ian Prest <ijprest> |
Tue 21 Jun 2005 11:02:48 PM UTC, original submission:
In GNU Make, it is possible to write a rule with more than one target. However, the meaning of this is the same as writing multiple rules that are identical except each has only one target. So if more than one of the targets is out-of-date, the command part of the rule will be executed more than one time.
|
Anonymous |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Completely agree.
Oddly enough, you can do this already for pattern rules. Consider the following:
all : a.foo a.bar b.foo b.bar
%.foo %.bar :
@echo rule 1: $@
b.foo b.bar :
@echo rule 2: $@
This produces the following output:
rule 1: a.foo
rule 2: b.foo
rule 2: b.bar
Note that the pattern rule is executed only once (to update two files!), but the second rule is executed twice (once for each target).