Subject: Re: bin/34934: make sometimes fails to handle multiple targets on the left correctly
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,>
From: David Laight <david@l8s.co.uk>
List: netbsd-bugs
Date: 10/29/2006 07:45:01
The following reply was made to PR bin/34934; it has been noted by GNATS.
From: David Laight <david@l8s.co.uk>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: bin/34934: make sometimes fails to handle multiple targets on the left correctly
Date: Sun, 29 Oct 2006 07:18:35 +0000
On Sat, Oct 28, 2006 at 10:30:00PM +0000, dholland@eecs.harvard.edu wrote:
> >Number: 34934
> >Category: bin
> >Synopsis: make sometimes fails to handle multiple targets on the left correctly
...
> >Description:
>
> If you have two (or presumably more) targets on the left hand side of
> a rule, and they're files that aren't in the current directory, make
> will sometimes fail to detect that they got built together and run the
> recipe twice, once "for" each target.
....
If you have:
a1 a1: b
echo $@
The make runs the rules twice, once for a1 and once for a2.
This is the correct and required behaviour.
(Otherwise the above could't output 'a1' and 'a2'.)
If you have something that generates two files then you have to
do something else (eg have one of the files depend on the other one).
David
--
David Laight: david@l8s.co.uk