Boost logo

Boost-Build :

Subject: Re: [Boost-build] How to match a regular expression against a source file
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2012-02-28 16:57:04


On 02/25/2012 07:59 AM, Felipe Magno de Almeida wrote:
> Hello,
> I'm trying to create a java toolset for Boost.Build, and I need to
> return a match for "package" against the java file so I
> can find where the javac will save the class file compiled. For the
> little I know about it seems I should do this matching in
> generated-targets in my generator, so I can create the file-target
> with the correct path.
> But I have no idea how to run this regular expression. I've seen
> HDRSCAN, but it doesn't seem it will return the matches before the
> call to generated-targets.
> Any help would be appreciated,

It's impossible to make this work perfectly.

a) Any file can be generated, thus we should
   be able to deal with the possibility that
   the java source might not exist when we
   start the build.
b) In order to resolve dependencies on generated
   files correctly, we have to know the locations
   of all targets that can be built before we start
   to build anything.

In Christ,
Steven Watanabe

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at