Hi Lynne, On 4/17/06, Lawrence, Lynne <[EMAIL PROTECTED]> wrote: > Folks, > > Is there a way, with GNU make, to alter the criteria it uses to test > whether a prerequisite is stale? > > For instance, when determining whether to copy a file from a build > directory to an install directory it would be convenient to copy only if > the file checksums differ, regardless of whether the file in the build > directory is newer.
I often do this manually. I'll have make create a file with a name which is slightly different from the target (like by appending .tmp or similar). If the .tmp file is identical to the target, I' remove the .tmp file. If the .tmp file differs from the target, then I'll copy it. This way you can have the file change when needed, but not force a recompile with every make. An example where I use this it to create a .h file which contains the SVN revision of the current directory, which is used as part of a version string. It's quite useful to use this technique for any generated source files. -- Dave Hylands Vancouver, BC, Canada http://www.DaveHylands.com/ _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
