Subject: [Boost-build] How to always execute shell script before building a target
From: Steve Lorimer (steve.lorimer_at_[hidden])
Date: 2014-07-01 00:57:38
My aim is to build a library which includes version information.
I have a script which will update ./version.cpp only if the version has
changed. This to prevent unnecessary rebuilds.
I have a lib target which globs *.cpp, which is inclusive of version.cpp.
The problem is that if I run bjam I can see it execute the script, and
update version.cpp, but the library is not rebuilt.
Only when I run bjam again does it see that version.cpp has changed, and
rebuild the lib
This is my jam file:
Echo [ SHELL "./write_version.sh" ] ;
: [ glob *.cc ]
This is the output of running bjam:
...found 119 targets...
...found 121 targets...
...updating 3 targets...
...updated 3 targets...
How can I get both the script and the library build working together?
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