|
From: | Philip Guenther |
Subject: | Re: Question about pattern rule with multiple targets |
Date: | Fri, 27 Jun 2014 14:34:38 -0700 |
On page 120 of the gnumake manual, it mentions support for patternrules with multiple targets.This pattern rule has two targets:%.tab.c %.tab.h: %.ybison -d $<So, if I have a simple rule that looks like:%.bar1 %.bar2 : %.footouch $(*F).bar1touch $(*F).bar2and then do:> touch a.foo> make a.bar1touch a.bar1touch a.bar2> make a.bar1make: 'a.bar1' is up to date.> rm a.bar2> make a.bar1make: 'a.bar1' is up to date.> make a.bar2touch a.bar1touch a.bar2What I was really hoping is that make would consider both a.bar1 anda.bar2 to be required outputs of the rule and if one of them isdeleted, then both the .bar1 and .bar2 targets should be consideredout-of-date. But when I manually remove the a.bar2 file, the a.bar1file is still considered to be up-to-date. Yet, when I then ask tobuild the a.bar2 target, both the a.bar1 and a.bar2 targets arere-built.
[Prev in Thread] | Current Thread | [Next in Thread] |