Hi,
I believe I have found a bug in GNU make. It is subtle enough that I
initially thought it was a feature; I am now convinced it is a bug.
Consider the following GNUmakefile:
-----------------------------------------
all: x.1 x.2 y.1 y.2
ifdef method1
x.%:
@echo $@
y.%:
@echo $@
endif
ifdef method2
x.1 x.2 y.1 y.2:
@echo $@
endif
ifdef method3
x.% y.%:
@echo $@
endif
------------------------------------------
Now watch what happens when I try to "gmake all" using the three
different methods:
------------------------------------------
|abacus>gmake --version
GNU Make version 3.79, by Richard Stallman and Roland McGrath.
Built for i686-pc-linux-gnu
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99
Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Report bugs to <[EMAIL PROTECTED]>.
|abacus>gmake all method1=true
x.1
x.2
y.1
y.2
|abacus>gmake all method2=true
x.1
x.2
y.1
y.2
|abacus>gmake all method3=true
x.1
x.2
------------------------------------------
I do not see why method 3 should produce different results than methods
1 and 2. If I do
|abacus>gmake --debug=v all method3=true
I get
<snip>
Considering target file `y.1'.
File `y.1' was considered already.
Considering target file `y.2'.
File `y.2' was considered already.
<snip>
It looks to me like multiple patterns to the left of the colon are being
improperly marked "considered." I have also tried GNU make versions
3.76.1 and 3.78.1. They exhibit the same behavior.
Thanks,
Jim Amundson