Boost logo

Boost-Build :

Subject: Re: [Boost-build] How to set special generation requirements for generated files
From: Moritz Hassert (mhassert_at_[hidden])
Date: 2010-07-22 14:58:42


Thanks for your answer.

Gevorg Voskanyan wrote :
> Moritz Hassert wrote:
> > * Does anyone know a more elegant solution to this problem I completely
> > overlooked?
>
> I don't know whether you'd consider this more elegant, but I think you'll
> agree this being simpler:
>
> rule bison-obj ( name : sources * : reqs * : def-build * : usage-reqs * )
> {
> obj $(name) : $(sources)
>
> : $(reqs) <define>SOME_MACRO <include>some/path
> : $(def-build)
> : $(usage-reqs)
>
> ;
> }
>
> bison-obj bison1
>
> : bison1.yy
> :
> : <bison.prefix>pre1
>
> ;
>
> bison-obj bison2
>
> : bison2.yy
> :
> : <bison.prefix>pre2
>
> ;
>
> Or perhaps as simple as this?
>
> local bison-reqs = <define>SOME_MACRO <include>some/path ;
>
> obj bison1
>
> : bison1.yy
> :
> : <bison.prefix>pre1 $(bison-reqs)
>
> ;
>
> obj bison2
>
> : bison2.yy
> :
> : <bison.prefix>pre2 $(bison-reqs)
>
> ;

Well thats exactly what I tried to avoid. I wanted to specify the requirements
only once and only in the lib rule, where they belong. Without the use of
extra varables. Something like that would have been my workaround.

But as it turns out there already is a "cpp" rule . See Steven's mail and my
response.

Greetings
Moritz

Geschaeftsfuehrer: Dipl.-Inform. Christopher Asp
Amtsgericht Mannheim HRB 105845


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