Boost logo

Boost-Build :

From: Rene Rivera (grafikrobot_at_[hidden])
Date: 2006-09-28 11:27:26


Ilya Sokolov wrote:
> Rene Rivera wrote:
>> Vladimir Prus wrote:

>>> Can we really handle macro sustitution with just patterns?
>>
>> No, but we can handle macro parsing with just patterns. For example:
>>
>> HDRSCAN =
>> "^[ \t]*#[ \t]*include[ \t]+DEPENDENT_INCLUDE\([ \t]([^)]+).*$" ;
>>
>> Would handle the above case. Of course it would be more complicated to
>> handle the regular includes plus a bunch of additional macros. Hence why
>> we only handle the regular includes.
>>
> see http://freetype.sourceforge.net/jam/changes.html#builtin-hdrmacro

Interesting, but "Scan filename for #define directives and filter those
that do not define a potential filename (e.g., it discards macros with
parameters)." And rest of their examples indicates that it won't handle
the OPs use case. Or for that matter most of the use cases I'm familiar
with in Boost. Arbitrarily parsing algorithmic header dependencies is by
definition language dependent. So it's a rather hard/impossible problem
to solve generically.

Although ideas on how to make it easier, and/or more flexible, for bjam
users to extend/customize the header scanning functionality are welcome :-)

-- 
-- Grafik - Don't Assume Anything
-- Redshift Software, Inc. - http://redshift-software.com
-- rrivera/acm.org - grafik/redshift-software.com
-- 102708583/icq - grafikrobot/aim - grafikrobot/yahoo

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