Boost logo

Boost-Build :

Subject: Re: [Boost-build] generating headers out of Jamfile
From: Vladimir Prus (vladimir_at_[hidden])
Date: 2011-01-29 02:59:13


Oliver Kowalke wrote:

> Am 29.01.2011 00:13, schrieb Steven Watanabe:
>> AMDG
>>
>> On 1/28/2011 2:56 PM, Oliver Kowalke wrote:
>>> how can I generate headers out of a Jamfile (if possible)?
>>>
>>> current Jamfile:
>>>
>>> alias sources
>>> : xyz_windows.cpp
>>> : <architecture>abc
>>> <target-os>windows
>>> <toolset>msvc
>>> ;
>>>
>>> alias sources
>>> : xyz_posix.cpp
>>> : <architecture>uvw
>>> <toolset>gcc
>>> ;
>>>
>>> explicit sources ;
>>>
>>> lib boost_xyz
>>> : sources
>>> : <link>shared:<define>BOOST_XYZ_DYN_LINK=1
>>> ;
>>>
>>> boost-install boost_xyz ;
>>>
>>> I'd like to generate header xyz.hpp out of some template files
>>> xyz_windows.hpp and xyz_posix.hpp.
>>>
>>
>> Use the make rule. Something like this:
>>
>> actions generate-xyz {
>> # shell commands here. $(>) is the source, $(<) is the target
>> }
>>
>> alias xyz-source.hpp : xyz_windows.hpp : /properties/ ;
>> make xyz.hpp : xyz-source.hpp : : @generate-xyz ;
>
> Ok -thx
>
> What happens when I use multiple configurations
>> from the same Boost tree. (I guarantee you that
>> I will do this. I would consider it a showstopper
>> if it doesn't work.)
>
> The lib requires properties <architecture>,<instruction-set> and
> <address-model>
> - all three are optional and not set by boost.build. therefore its
> required that the user specifies those properties at command line.
> I believe no other boost library uses this properties yet and if a
> future lib will do I'm sure it will require the same values.

FWIW, I am working on a patch to have those features always set for gcc, and
hopefully for other compilers for which they can be reliably inferred. It's the
top thing on my Boost.Build queue.

- Volodya

-- 
Vladimir Prus
Mentor Graphics
+7 (812) 677-68-40

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