On 2010.02.06 19:53, Maxim Yegorushkin wrote:
On 25/01/10 08:59, Oleksandr Gavenko wrote:
On 2010.01.24 16:04, James McElhannon wrote:
> Suppose I have a file A that is dependent on B and C. I have a tool,
> mytool, that can create B and C at one time from their respective
> sources. When making A, I would want make to do "mytool B C" as one of
> its steps.
Sorry GNU make does not support this directly.
It does. See example 3 on
http://www.gnu.org/software/make/manual/make.html.gz#Pattern-Examples
Wow, I thing than know all, but not!
From manual:
Pattern rules may have more than one target. Unlike normal rules, this
does not act as many different rules with the same prerequisites and
commands. If a pattern rule has multiple targets, make knows that the
rule's commands are responsible for making all of the targets.
So
%.tab.c %.tab.h: %.y
bison -d $<
for my.tab.c and my.tab.h run bison only once!
--
С уважением, Александр Гавенко.
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make