Boost logo

Boost-Build :

Subject: Re: [Boost-build] How to make a target always build?
From: Vladimir Prus (ghost_at_[hidden])
Date: 2009-08-29 07:17:07


On Saturday 22 August 2009 Matthew Chambers wrote:

> I can't figure out how to make my tarball targets always build. I tried
> the ALWAYS rule on both the filename and the target itself and neither
> did anything.
>
> rule create ( tar-filepath : tar-sources * : tar-options * )
> {
> local tar = [ targets.create-typed-target TBZ2 : [ project.current ] :
> $(tar-filepath) : $(tar-sources) : $(tar-options) ] ;
> ALWAYS $(tar) ; # doesn't work
> ALWAYS $(tar-filepath) ; # doesn't work
> return $(tar) ;
> }

Since this is a recurring request, I have implemented virtual-target.always.
Note that the above code creates metatarget (target instance), not a concrete
target (virtual-target instance), so the 'always' call must be somewhere
else, like in generator.

- Volodya


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