Boost logo

Boost-Build :

Subject: Re: [Boost-build] Call of interest
From: Konstantin Litvinenko (to.darkangel_at_[hidden])
Date: 2009-05-29 02:28:48


Konstantin Litvinenko пишет:
>> 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.
>
> I can cache timestamps and #include and not rescan if timestamps are the
> same, as I do it now. With MD5 I should rescan always.
>
>> A few times I have run into the following.
>>
>> a) modify a file
>> b) rebuild
>> c) copy an older version of the file over the current version
>> d) rebuild
>> e) nothing happens because the timestamp of the file doesn't reflect
>> the fact that it has changed.
>>
>> Another case:
>> a) change a file
>> b) rebuild
>> c) change the file again before the next clock tick.
>> d) rebuild
>>
>> This can happen when you have an automated script invoking
>> the build system multiple times, and the build is sufficiently fast.
>
> Yes, that is the case. Well, than I should implement MD5 checker :)

    After slipping with that I am not so sure... A couple of questions
arise:
1) If I check MD5 signatures for *.cpp files, should I check it for *.h
files? I think I should.
2) If I check MD5 signatures for *.cpp and *.h should I check *.obj,
*.exe, *.lib, *.dll, *.so and so on - all files that participate in build?

exe test : main.cpp ;
copy : test : <destination>../work ;

It is same probability as in case 1 to replace test.exe and simply
forget about that.

prebuilt-lib foo : : ../lib/foo.lib ;
exe test : main.cpp foo ;

If ../lib/foo.lib is a link on a file than it is easy to replace with
different and have non-consistent build.

But If I should check whole build for MD5 that would kill performance at
all....


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