[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 (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> .  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

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
(last paragraph)?

reply via email to

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