Sources Bugzilla – Bug 90
infinite loop in Makerules
Last modified: 2004-09-27 12:37:53 UTC
In Makerules somewhere around line 1097 there is the following fragment.
$(addprefix $(inst_includedir)/,$(headers)): $(inst_includedir)/%: % $(+force)
echo "doing header installation"
When configured with --enable-force-install +force variable contains .PHONY
target force-install. This makes $(addprefix $(inst_includedir)/,$(headers))
always outdated which makes make always try to rebuild them and also (here is
the catch) makes anything that depends on any header from $(addprefix
$(inst_includedir)/,$(headers)) outdated too.
Now let's take a look at tls.make.c or rather at the makefile fragment
(tls.make) that get's generated from it. There we see something like this:
And now the last piece of the puzzle from Makerules:
Putting it all together gives the following effect:
1. make tries to include tls.make - it does not exist
2. but there is a rule to build it from tls.make.c so make does that
3. make re-executes itself and reads tls.make in
4. inside tls.make there is a rule that says tls.make depends on limits.h
5. and there is a rule how to build limits.h which also makes limits.h always
6. make has no choice but to rebuild limits.h and as a result tls.make
7. now make has to re-execute again because tls.make has changed, so goto (3)
The bottom line: depending real tragets (files) on phony targets is a bad idea ;-)
Compilation problem is to be duplicated to #333.
*** This bug has been marked as a duplicate of 333 ***