On Mon, 2023-01-16 at 00:15 +0900, KO Myung-Hun wrote: > Then, this patch is acceptable? Or MSYS is a special case ?
I don't think this patch is a good idea. I said in my initial email: > I don't think I like this change. I understand its usefulness but in > general make never tries to manipulate the target names like this. And I haven't changed my mind. Also I asked: > What do you do in situations where there are targets for BOTH "foo" > and "foo.exe" in the makefile? Then when you want to build "foo" it > may decide that it's up to date, because it sees the "foo.exe" file > instead. and you replied: > In this case, Make should not find "foo.exe" for "foo" target. But this does not seem like an easy thing to accomplish, at all. What if there is a "%.exe" pattern rule, not an explicit rule for "foo.exe"? It seems like this behavior would be very confusing for users, where sometimes you would get one behavior and sometimes another, based on what other rules did or didn't exist. The real problem here is that GCC is behaving in an unusual way, where you ask it to generate an output file with one name and instead it generates an output file with a different name. My opinion is that this is a problem or an issue for GCC, and that we should not attempt to paper over that issue by making changes in GNU Make.