build.jam:
project : usage-requirements <include>. ;
alias PUB : : : : <use>/ProjectA//PUB
<use>/ProjectB//PUB ;
lib LIB : [ glob *.c : feature.c ]
: <link>static
<use>/ProjectA//PUB
<use>/ProjectB//PUB ;
I would like to add a target that will add feature.c to the sources and define USE_FEATURE. I've tried a few different things, but none seem to work as I want.
alias LIB_WITH_FEAT : LIB feature.c : <define>USE_FEATURE ;
alias LIB_WITH_FEAT : LIB : <source>feature.c <define>USE_FEATURE ;
does not add feature.c or USE_FEATURE to the build. But gives no errors or warnings. It just builds LIB.
lib LIB_WITH_FEAT : feature.c LIB : <define>USE_FEATURE ;
gives "warn: Unable to construct LIB_WITH_FEAT". Although if it worked, I don't think it'd be what I wanted as it would try to build LIB separately and LIB needs the USE_FEATURE to work properly with feature.c.