List Info

Thread: Tool generating multiple files




Tool generating multiple files
user name
2006-06-28 21:38:51
Sohail Somani wrote:
> Thank you, I had taken a look at bison.jam but did not
notice the "CPP
> HPP" part of it until 30 seconds ago. So
basically my tool will need to
> have CPP HPP TXT.

Yup.

> Something which I had forgotten to mention was that the
output file
> names are dependent on the contents of the file, so I
need to actually
> scan the file for certain patterns. I could not find an
example of this.

Hmm.

> 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.

That's all the information I can give you. Vladimir Prus
would be able to
give you more info if needed.

The only other thing I can suggest is to look through the
Boost Jamfile.v2
files for the Boost libraries as some of these are using
some neat tricks.

HTH,
- Reece
____________________________________________________________
_____
Try Live.com - your fast, personalized homepage with all the
things you care about in one place.
http://www.live.com/ge
tstarted
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Tool generating multiple files
user name
2006-06-30 08: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
http://vladimir_pru
s.blogspot.com
Boost.Build V2: http://boost.org/boost-
build2
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )