Hi Christian,
Thank you very much for reporting this.
Christian Franke wrote:
The root of the problem is this new rule in Makefile.in:
# prevent 'make' from trying to remake source files
...
%.h %.cc : ;
It looks like an interference between the above empty rule and the default
rules of GNU make. Invoking make with option '-r' is not enough to fix the
problem. I have managed to "fix" it by adding an empty .SUFFIXES to the
Makefile and replacing the pattern rule '%.o : %.cc' with a suffix rule '.cc.o'.
All I wanted was to prevent make from trying lots of expensive ways to
remake source files that do not need to be remade in the first place[1]. It
seems that I have managed to open a can of worms instead.
[1] http://www.gnu.org/software/make/manual/html_node/Empty-Recipes.html
"You may be wondering why you would want to define a recipe that does
nothing. One reason this is useful is to prevent a target from getting
implicit recipes (from implicit rules or the .DEFAULT special target;"
I don't know why the above happens if this rule is present. Bug in GNU
make itself?
Maybe. IMHO, make should not try to build arbitrary targets, and should not
add suffixes to target names to make them match some default rule. It is
confusing.
Best regards,
Antonio.