[Scons-users] Build obj only if not everything is up to date

Roman Karlstetter Roman.Karlstetter at ifta.com
Tue Jul 8 05:45:20 EDT 2014


Hi,

I have the following problem:

I have a version.cpp file which makes use of __DATE__ and __TIME__ macros to indicate when the build was performed. I can use the AlwaysBuild functionality of scons to always build the respective object. However, this has the (expected) implication that the final binary always gets rebuilt, because version.obj always has changed.

It would be better for us to only rebuild the "version.obj" if there are changes to other dependencies that force a rebuild of the binary (or to version.cpp, of course), such that when nothing in the directory has changed, nothing is rebuilt. Is something like that possible at all with scons?

Thanks in advance and kind regards,
Roman




More information about the Scons-users mailing list