bug-make
[Top][All Lists]
Advanced

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

Re: GNU make to consider files checksum


From: Brian Dessent
Subject: Re: GNU make to consider files checksum
Date: Sun, 13 Apr 2008 02:15:37 -0700

Tim Murphy wrote:

> One small concern that I have with checksums is that it might take a
> really long time to check large files or a lot of files.

True.  However if you have, say, 100MB of objects then the time to
calculate checksums is almost certainly going to be smaller than the
time it takes to unnecessarily re-link those 100MB of objects when one
source file has trivially changed.  In other words, the savings scale
with the cost.  And the savings have a possibility to scale faster than
cost, such as when the checksum proves it unnecessary to rebuild a
library that would otherwise have triggered the re-linking of numerous
other binaries in the tree.

Autoconf for a long time has had a very primitive version of this type
of logic with config.h, since nearly every source file in a tree
typically depends on config.h.

What would be even neater would be if gcc could implement something
analogous to what happened with -MD: generate a md5sum as a side effect
of compilation.  Then make could use that with no overhead, just as it
currently possible to use the dependency output of -MD.

Brian




reply via email to

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