[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gmake include makefile question
From: |
Paul D. Smith |
Subject: |
Re: gmake include makefile question |
Date: |
20 Mar 2006 21:27:52 -0500 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 |
%% "Murali" <maha.murali@gmail.com> writes:
m> (1) Now I understand that the PHONY directive should have caused make
m> to go into an infinite loop and that gmake somehow recognized and
m> prevented this scenario. Still I do not understand how removing the
m> PHONY directive fixed the problem
I'm not sure where the confusion lies. Normally after make rebuilds an
included makefile it will re-exec itself so that it reads the contents
of the rebuilt makefile.
If the makefile is declared .PHONY it will never be up-to-date and so
make would re-exec infinitely. So to avoid that, if the makefile is
PHONY it never re-execs at all, not even once.
That's the behavior you were seeing.
m> (2) "gmake -d" did not display any information which told me it was
m> trying to call itself recursively. Adding this info to the debug
m> display would help others and me (in the future) realize something like
m> this is a problem.
It _wasn't_ trying to call itself recursively, that's why it didn't say
it was.
If you look at it now you'll see that the debug header information
(version info, etc.) is printed in the debug output each time make
re-execs itself.
--
-------------------------------------------------------------------------------
Paul D. Smith <psmith@gnu.org> 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