Subject: Re: [Boost-build] Call of interest
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-05-28 16:12:50
Konstantin Litvinenko wrote:
> Vladimir Prus Ð¿Ð¸ÑÐµÑ:
>>>> How hard would it be to make Hammer compute MD5 signature of a.cpp
>>>> content and use *that* to decide if update is necessary.
>>> Hm. Don't know right now. Checker is separate part and has 150 LOC,
>>> so I
>>> think it is not to hard to implement another one. But I am curious why
>>> to use MD5 for that? I saw SCons do that, but don't get it why. Why use
>>> all this cryptographic and not relay on timestamp? Is there a *real*
>> Well, if you change a file, save, and then realize the change is bad
>> idea and revert, you probably don't want a rebuild.
> I made a mistake and wait 1-5 secs to rebuild. But if build system
> will calculate md5 every time it is just wast of CPU cycles! I don't
> see any *real* benefit of doing that...
If you're already scanning the file for headers, I don't see that computing
a hash will significantly reduce processing speed, since processing the
file is most likely I/O bound anyway.
A few times I have run into the following.
a) modify a file
c) copy an older version of the file over the current version
e) nothing happens because the timestamp of the file doesn't reflect the
fact that it has changed.
a) change a file
c) change the file again before the next clock tick.
This can happen when you have an automated script invoking
the build system multiple times, and the build is sufficiently fast.
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk