Boost logo

Boost-Build :

From: Rene Rivera (grafik.list_at_[hidden])
Date: 2005-08-31 10:54:10


Joao Abecasis wrote:
> Another way to state the problem is how to read the contents of a file
> with current bjam + Boost.Build2?
>
> Is there currently a way to do this?
>
> Something grep-like...
>
> Handling the regular expressions and iterating over files (or even
> finding them using GLOB) seems to be the easy part, what I'm really
> missing is how to open those files and read their contents.
>
> Any pointers?

I though someone had worked on a CAT builtin that would read in a file,
but I don't see it now. One possibility is to use the SHELL builtin to
run "cat [file]" (or whatever the platform equivalent is) to get the text.

The other way is to do what the --help option does. It hijacks the
header scanning to scan/read the *.jam files in. Take a look at
v2/utils/doc.jam for how that's done.

Of course a contribution of a "CAT" builtin would be ideal ;-) (I might
do this myself next week if no one beats me to it.)

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

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