[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Issue with automatic dependency generation in gmake

From: Paul Smith
Subject: RE: Issue with automatic dependency generation in gmake
Date: Sat, 12 Sep 2009 18:28:20 -0400

On Thu, 2009-09-10 at 21:56 -0700, Varambally, Dheeraj B wrote:
> Thanks for the reply. I'm trying to generate and include the
> dependencies as described in section 4.14 (automatic prerequisite
> generation) of the GNU users guide. The dependencies are generated by
> the compiler automatically while it compiles the source (dependency
> generation phase).

Others have given you good advice, but the short and sweet answer is: if
you use the method for automatic dependency generation described in the
GNU make manual, you CANNOT generate both the dependency file and the
object file (true compilation) with the same rule.

In order for the method in the book to work correctly you MUST have a
separate step that generates only the dependency information and does
not generate an object file.

If you want to learn about a more advanced method than the one found in
the GNU make manual, that does allow the dependency generation and
compilation steps to be the same, see my web page below.

 Paul D. Smith <address@hidden>          Find some GNU make tips at:            
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist

reply via email to

[Prev in Thread] Current Thread [Next in Thread]