From: Vladimir Prus (ghost_at_[hidden])
Date: 2006-02-16 03:10:18
> I am writing a custom-linking-generator class (derived from
> unix-linking-generator) with generated-targets rule that wants to
> remove archive sources tagged with a special property from the sources
> list before invoking unix-linking-generator.generated-targets.
> For such archives I add a property to the target properties list
> (e.g., <include-library-whole>path/libfoo.a)
> that eventually results in the link action putting
> -include_whole path/libfoo.a
> in the link command line. The problem is that in removing libfoo.a
> from the source list passed to unix-linking-generator.generated-targets
> I lose the DEPENDS of the target on libfoo.a that would have
> been set had libfoo.a not been removed from the list. Can someone
> give me a pointer on how to do that in my custom generated-targets?
The most clean method, I believe, is to have this code:
if <hptns-include-whole>yes in $(psraw)
properties2 += <hptns-include-whole-library>$(s) ;
Then, make sure that <hptns-include-whole-library> feature is declared with
the 'dependency' attribute.
If you take a look at
there's a complete example of adding a dependency feature, and how to get its
value to the command line, and incidentally, how to set DEPENDS propertly.
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