> (b) the messages are only produced for some words

That's not the case for me, with Debian Lenny's 3.81.

mart...@whitewater:~/tmp$ dpkg -S `which make`
make: /usr/bin/make
mart...@whitewater:~/tmp$ dpkg --status make
...
Version: 3.81-5
...
mart...@whitewater:~/tmp$ make -f buggyMakefile 
buggyMakefile:2: target `normal' given more than once in the same rule.
buggyMakefile:2: target `c99-pedantic' given more than once in the same rule.
buggyMakefile:2: target `c89-pedantic' given more than once in the same rule.
buggyMakefile:2: target `foobar' given more than once in the same rule.
buggyMakefile:2: target `baz' given more than once in the same rule.
make: `normal' is up to date.
mart...@whitewater:~/tmp$

>    GNU MAke 3.81

That capital A... surely not a hardware fault?

-----Original Message-----
From: bug-make-bounces+mdorey=bluearc....@gnu.org 
[mailto:bug-make-bounces+mdorey=bluearc....@gnu.org] On Behalf Of Jamie Lokier
Sent: Wednesday, February 10, 2010 12:41
To: bug-make@gnu.org
Subject: Weird text-dependent bug in $(eval ...), simple test case

Dear Make maintainers,

Create a file called buggyMakefile with these two lines:

    CONFIGS := normal c99-pedantic c89-pedantic foobar baz
    $(foreach C,$(CONFIGS),$(eval $C $C/:;))

and then run "make -f buggyMakefile".

If you're using the same GNU Make 3.81 as me, it will greet you with
some surprising messages:

buggyMakefile:2: target `c99-pedantic' given more than once in the same rule.
buggyMakefile:2: target `foobar' given more than once in the same rule.
buggyMakefile:2: target `baz' given more than once in the same rule.
make: `normal' is up to date.

It's surprising because (a) there shouldn't be those "more than once"
messages at all (the forward-slash makes them different targets), and
(b) the messages are only produced for some words, not others.  It
depends on the words, not the order in the list.

It is dependent on the characters in the words.  If the words
"normal" and "c89-pedantic" are changed to something else, even with
the same length, they show up in the "more than once" errors.

This bug was found with the "make-3.81-6" package distributed with
32-bit x86 Ubuntu 9.10 (Karmic Koala), which should be plain GNU Make 3.81.
Output of "make --version":

    GNU MAke 3.81
    Copyright (C) 2006  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.

    This program built for i486-pc-linux-gnu

Thanks,
-- Jamie


_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-make


_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to