From: Vladimir Prus (ghost_at_[hidden])
Date: 2007-08-15 14:43:01
On Friday 10 August 2007 02:50:38 Frank Birbacher wrote:
> Vladimir Prus schrieb:
> > ALWAYS is low-level bjam builtin that applies to low-level
> > bjam targets. It does not work for Boost.Build targets.
> What is a "low-level bjam target"? ALWAYS doesn't work on source files.
> But would intermediate generated targets work?
There are three kinds of targets in Boost.Build.
So called "main targets" or "metatargets" are what users
defines in Jamfiles. See build/targets.jam for implementation.
When a metatarget is built, generators and other mechanism
produce a tree of "virtual targets", see build/virtual-target.jam.
Finally, each virtual target is converted into actual bjam
target (by calling the 'actualize' method). bjam target is just
a string. ALWAYS works on bjam targets only.
By looking at notfile-target in build/virtual-target.jam you
can see a virtual target that makes bjam target always updated,
using the same ALWAYS builtin. So, I suppose you
can create a custom class derived from file-target and modify
it to call ALWAYS on real bjam target.
> I'm defining a new source file type which can be translated to a
> resource script ".rc". This ".rc" file includes svn version information
> and I need to generate a new one not based on file timestamps but on
> "svnversion" information. This version can just change without bjam
> noticing it. So I would prefer bjam to just rebuild the file every time.
> So the general question is: How can I teach bjam to update files based
> on an arbitrary function instead of a timestamp test.
It is not possible now. I was thinking about implementing signature-based
checks -- where the build command will be checksummed by default, but
which can be trivially extended to checksum just about anything. Nothing
concrete was done.
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