From: Rafael L. <ra...@de...> - 2005-12-31 09:55:59
|
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 |
From: Paul D. S. <ps...@gn...> - 2006-01-03 02:06:16
|
This is definitely a bug. Please report this on Savannah: https://savannah.gnu.org/bugs/?func=additem&group=make Thank you. -- ------------------------------------------------------------------------------- Paul D. Smith <ps...@gn...> Find some GNU make tips at: http://www.gnu.org http://make.paulandlesley.org "Please remain calm...I may be mad, but I am a professional." --Mad Scientist |
From: Paul D. S. <ps...@gn...> - 2006-01-03 17:23:21
|
Never mind about reporting this on Savannah, I've fixed this bug. The fix will be available in the next release. If you want to test the fix, apply this patch: --- read.c 14 Dec 2005 13:11:18 -0000 1.155 +++ read.c 3 Jan 2006 17:21:02 -0000 @@ -1177,10 +1177,12 @@ /* Put all the prerequisites here; they'll be parsed later. */ deps = (struct dep *) xmalloc (sizeof (struct dep)); deps->next = 0; - deps->name = xstrdup (beg); + deps->name = savestring (beg, end - beg + 1); + deps->file = 0; + deps->changed = 0; + deps->ignore_mtime = 0; deps->staticpattern = 0; deps->need_2nd_expansion = 0; - deps->file = 0; } else deps = 0; -- ------------------------------------------------------------------------------- Paul D. Smith <ps...@gn...> Find some GNU make tips at: http://www.gnu.org http://make.paulandlesley.org "Please remain calm...I may be mad, but I am a professional." --Mad Scientist |
From: Rafael L. <rla...@us...> - 2006-01-08 12:12:57
|
* Paul D. Smith <ps...@gn...> [2006-01-03 12:22]: > Never mind about reporting this on Savannah, I've fixed this bug. Thanks for fixing the bug. > The fix will be available in the next release. Do you know when the next release will happen? -- Rafael |