help-make
[Top][All Lists]
Advanced

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

Re: Merging rules


From: Basin Ilya
Subject: Re: Merging rules
Date: Thu, 14 Jun 2018 14:31:52 +0300
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0

> I do believe the
> command is run only once, which is fine because it produces both files

I think that `make all` depends on just one output of that rule. If you really 
want to such command only once, then don't mention additional outputs in the 
makefile or choose a primary output and make the others depend on it (but 
you'll have to ensure that the additional outputs are newer then the primary 
output, using `touch`)


On 13.06.2018 21:32, Sébastien Hinderer wrote:
> Hi, Basin!
> 
> Basin Ilya (2018/06/13 21:15 +0300):
>> Hi Sébastien.
>>
>>
>>> Then make will think that with only one invocation all the different
>>> types of files will be produced, which is of course wrong.
>>
>> I think you've got a wrong impression. Make will run the rule as many
>> times as needed to make all the targets.
> 
> Strange: I have a Makefile with a rule to generate a parser from a
> grammar and that parser consists in two files, and I do believe the
> command is run only once, which is fine because it produces both files
> at the same time.
> 
> Or perhaps is that the difference between pattern rules and static
> pattern rules?
> 
> Sébastien.
> 
> _______________________________________________
> Help-make mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/help-make
> 



reply via email to

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