help-make
[Top][All Lists]
Advanced

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

Re: Content-based dependencies


From: Yang Zhang
Subject: Re: Content-based dependencies
Date: Wed, 06 May 2009 14:12:04 -0400
User-agent: Thunderbird 2.0.0.21 (X11/20090318)

Mike Shal wrote:
On 5/6/09, Yang Zhang <address@hidden> wrote:
Mike Shal wrote:
Ultimately what is your goal here? Are you trying to avoid the "change
a comment in a header rebuilds everything" issue, or do you have some
other timestamp problems? Keep in mind that doing a diff or using a
checksum to determine out-of-dateness isn't exactly cheap - you may be
trying to optimize a corner case to the detriment of the general case.

 That's close to what I'm trying to do.  I'm using code generation tools
that produce sets of files (e.g., lzz produces .h and .cc files).  In that
example, usually only the .cc file changes, but the .h file also gets
touched, causing all the other .cc files that depend on it to get recompiled
as well.


I've never heard of lzz before, so I had to look it up. According to
the docs it has this option:

 -hd
    Write the header file only if it is different than the previous file.

Does that not do what you want by avoiding to change the timestamp on
the header when it hasn't changed?

Of course if the header doesn't change too often, it shouldn't be much
trouble to write it manually and avoid the whole lazy code generation
issue altogether :)

-Mike

Sorry, I just randomly pulled that as an example, and you're right it does have the -hd option, but other tools I use don't (e.g. clamp, the even lesser-known C++ lambda preprocessor).
--
Yang Zhang
http://www.mit.edu/~y_z/




reply via email to

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