Hi,
I'm trying to get Boost.Build to generate a source file at build time
containing an automatically generated version number or build-id. I have a
solution that sort of works. However it causes my exe to be rebuilt every
time I invoke b2. I would like the source file to be generated only when the
exe is built. And of course it needs to be generated every time the exe is
built. How do I accomplish that?
Are there examples of this having been done before? I would assume so but I
haven't been able to find any.
Here's what I have so far:
explicit BuildTime2.cpp ;
always BuildTime2.cpp ;
time = [ SHELL "sh BuildTime.sh" ] ;
make BuildTime2.cpp : : @buildtimecpp ;
actions buildtimecpp
{
echo const char* g_BuildTime = "$(time)"; >"$(<)"
}
exe MyExe :
BuildTime2.cpp
...
Regards,
Niklas Angare
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build