[Top][All Lists]

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

Re: Library dependency files

From: Paul Smith
Subject: Re: Library dependency files
Date: Tue, 27 Apr 2010 15:16:36 -0400

On Tue, 2010-04-27 at 15:00 -0400, Todd Showalter wrote:
> Depending on *how* we build this file, it will have different
> dependencies.  The logic is, if anything, backwards; it's the
> destination file (ie: the .o file) that should have the dependency
> information attached to it. 

I'm not sure what you mean here: certainly it's the target (.o) that has
the prerequisite information attached to it.  What else would have it?
It cannot work to have the prerequisites defined for the source file.
Maybe the document was confusing?

If you are passing different -D options to build .o's, then either (a)
you'll have to clean out your source tree between builds so you get
recompiles when the -D options change, or (b) you have different
destination directories for the .o files (or, sometimes, modify the .o
filename depending on how it was compiled) when built with -D.

If (a), then just be sure to clean out the .d files at the same time as
the .o files and you're good.  If (b), then be sure to put the .d files
in the same location (or use the same naming convention) as the .o files
and you're good.  I don't see a problem here.

> Even that isn't enough in our system,
> since some of the build metadata lives entirely outside of make's ken;
> make will not detect inter-run modifications to environment variables
> that can affect dependencies, for instance.

I can't say much about this.  It's quite possible to have systems that
the auto-dep environment can't handle, although those tend to be systems
that make itself has a hard time handling (make decides what to rebuild
solely based on timestamp differences in the filesystem: it has no
metadata preserved across builds and any "external" change, such as the
environment variable change you describe, CANNOT be used by make to make
rebuild decisions).

 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]