|
From: | Oleksandr Gavenko |
Subject: | Re: creating multiple outputs with a tool in one step |
Date: | Mon, 08 Feb 2010 11:01:39 +0200 |
User-agent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0 |
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! -- С уважением, Александр Гавенко.
[Prev in Thread] | Current Thread | [Next in Thread] |