help-make
[Top][All Lists]
Advanced

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

Re: better dependency generation 2


From: Paul D. Smith
Subject: Re: better dependency generation 2
Date: Thu, 5 Jul 2001 13:44:20 -0400

%% Nicholas Charles Leippe <address@hidden> writes:

  ncl> The first one, 'Avoiding Re-exec of make' relies on the
  ncl> assumption that "we don't need the up-to-date prerequisite list
  ncl> in this build..."

Note there's only one recommended solution: the last one under the topic
"Advanced Auto-Dependencies".  The subsections of that are both parts of
that one solution.

The other one is there for comparison only, really.

  ncl> While this is true for most projects, it is no longer true in the
  ncl> case where some of the included headers are auto generated files.

Not so (in general, anyway).  We do a _lot_ of auto-generation of both
header and source files here, and it's never been a problem.

  ncl> An incorrect build could result if the dependency between a .cpp
  ncl> file and an autogenerated file (.ui.h if you've followed my
  ncl> earlier threads) if the .h file's source has changed, and the
  ncl> .cpp's dependency on the .h is new.

If the .cpp's dependency on the .h is new, then something in the .cpp
file, or one of the other files that the .o depends on, must have
changed to include it.

So, the target (.o) would _always_ be rebuilt and it will generate a
new, correct set of dependencies for the next build.


If you don't think so, please provide a more exact set of steps that
would cause the problem you refer to, with filenames etc.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://www.paulandlesley.org/gmake/
 "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]