Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2006-06-30 04:41:37

On Thursday 29 June 2006 01:38, Reece Dunn wrote:

> > Anyway the input file [AB.t] will contain:
> >
> > Type A : BaseA;
> > Type B : BaseB;
> >
> > And I'll generate A.(hpp|txt|cpp) and similarly for B. I want bjam to
> > know about these so that --clean will remove them and so that I can do:
> >
> > lib a : AB.t ;
> >
> > In a Jamfile.
> You will need to write a custom generator for the T file. If you look at
> what the C generators are doing, you'll find out how they are scanning
> for H/HPP dependencies and adding them to BBv2.
> Essentially, all you need to do is take your scanned list of CPP files and
> add them to the list of sources. You may need to do something with them
> to get BBv2 to be able to process them.
> IIUC, you also want to process the T file to generate the files, so the
> A.[h|c]pp files will be in msvc-7.1/release, etc. For this, you can also
> look at the verbatum generator in the BBv2 documentation.

I am not quite sure that using header scanning mechanism will be quite
helpfull, since it's run after the list of all targets is determined.

What's desired here is:

1. Read file content when generator is running.
2. Somehow cache this information so that we don't always rescan the file.

I tend to believe that the most efficient method to do (1) is to write a
Python module and call it from bjam. Unfortunately, I don't have a ready
pointer to the code that calls Python module, but it must be somewhere in
mailing list archive.

- Volodya

Vladimir Prus
Boost.Build V2:

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