[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Proposed syntax for coincidental rules
From: |
Alessandro Vesely |
Subject: |
Re: Proposed syntax for coincidental rules |
Date: |
Mon, 15 May 2006 14:41:16 +0200 |
User-agent: |
Thunderbird 1.5.0.2 (Windows/20060308) |
Paul D. Smith wrote:
%% Alessandro Vesely <address@hidden> writes:
av> I couldn't find a statement about multiple targets in SUS' man
av> page. SUS clearly states that target rules "can have more than
av> one target name". But it never says that it "is equivalent to
av> writing many rules" as in
av> http://www.gnu.org/software/make/manual/make.html#Multiple-Targets
av> . I wander if running the commands just once would be POSIX
av> compliant.
I couldn't find it either: but I think this must just be an error in the
spec. There is not even one single implementation of "make" that I'm
aware of that treats multiple targets like this.
OTOH, there is no point in prescribing how many times make should run a
command after having said that the purpose of commands is to update the
targets and that inferring the correct sequence of invocations is make's
task.
[...]
This is _required_ for parallel builds. If you use "make -j3" make will
try to build all three of those targets at the same time, so it will run
the same command three times, which will wreak havoc on the output.
Parallel builds is an added feature. It may only be useful under certain
assumptions, namely that one command only builds one target...?
Basically, make is allowed to do "bad things" (and it will do them, at
least sometimes) if it thinks that each target is built individually.
That's a somewhat less reassuring statement. Anyway, how do you like
.COINCIDENTAL as a special built-in target name? Do you still believe
what you wrote in
http://lists.gnu.org/archive/html/help-make/2002-04/msg00026.html
(last paragraph)?
- GNU make source code, Leeuwesteijn,Joost, 2006/05/11
- Re: GNU make source code, Paul D. Smith, 2006/05/11
- Proposed syntax for coincidental rules (was: Re: GNU make source code, Alessandro Vesely, 2006/05/13
- Re: Proposed syntax for coincidental rules (was: Re: GNU make source code, Paul D. Smith, 2006/05/13
- Re: Proposed syntax for coincidental rules, Alessandro Vesely, 2006/05/14
- Re: Proposed syntax for coincidental rules, Paul D. Smith, 2006/05/14
- Re: Proposed syntax for coincidental rules,
Alessandro Vesely <=
- Re: Proposed syntax for coincidental rules, Paul D. Smith, 2006/05/15
- Re: Proposed syntax for coincidental rules, Alessandro Vesely, 2006/05/15