[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Pattern rule defined multiple times
From: |
Rafael Laboissiere |
Subject: |
Pattern rule defined multiple times |
Date: |
Sat, 31 Dec 2005 10:55:57 +0100 |
User-agent: |
Mutt/1.5.9i |
I apologize if the issue I discuss below has already been discussed here. I
do not have much time to browse the mailing list archives.
I noticed a difference in behavior between v3.80 and v3.81 of make regarding
multiple defined pattern rules. Consider the following Makefile:
####################################################################
all:
@touch foo.x
@$(MAKE) foo.y
%.y : %.x ; @echo first
%.y : %.x
@echo second
####################################################################
The behavior I would expect is the one of v3.80, in which the second rule
override the first:
$ make --version
GNU Make 3.80
Copyright (C) 2002 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.
$ make -s
second
However, v3.81 behaves differently:
$ make --version
GNU Make 3.81beta4
Copyright (C) 2003 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
$ make -s
first
Is this an intended feature or a bug? If the former, could you please
explain to me the rationale of having syntactically equivalent forms with
different semantics?
--
Rafael
- Pattern rule defined multiple times,
Rafael Laboissiere <=