Boost logo

Boost-Build :

From: Khassapov, Alex (Alex.Khassapov_at_[hidden])
Date: 2008-02-21 21:12:05


Hi

Why don't use -o option to specify otput file instead of copying the
file, I did it for other esql compiler before:

cpre -I"$(INCLUDES)" -Cansi_c -O$(<) $(>)

-----Original Message-----
From: boost-build-bounces_at_[hidden]
[mailto:boost-build-bounces_at_[hidden]] On Behalf Of Eli Green
Sent: Thursday, 21 February 2008 8:43 AM
To: boost-build_at_[hidden]
Subject: Re: [Boost-build] Problem with include directory for generated
.cfile

Vladimir Prus <ghost <at> cs.msu.su> writes:

>
> Eli Green wrote:
>
> > I've created a generator that lets me turn .ec (Informix ESQL) into
.c
> > files. This part works perfectly. The next part, actually compiling
the .c
> > file, is failing because the current directory is not being searched
for
> > header files. So where bjam is doing this:
> >
> > esql -e xxx.c
> > gcc -c xxx.c
> >
> > I want to somehow convince it to do this:
> >
> > esql -e xxx.c
> > gcc -I. -c xxx.c
> >
> > While I'm relatively familiar with normal Perforce Jam, bjam's build
system
> > is obviously a fair bit more complex and I get the feeling I can't
just
> > append "." to INCLUDE on $(<). If that IS possible, I just need to
know
> > where to do it.
>
> How is compiling of a generated file .c different from compilation of
> an ordinary .c file? If the header file is not generated,
> then the 'include' feature allows to add an include path.
>

My ESQL rules look like this:

type.register ESQL : ec ;

generators.register-standard esql.file : ESQL : C ;

actions file
{
    "$INFORMIXDIR/bin/esql" -e $(>)
    mv $(>:B).c $(<)
}

In the environment I'm testing it in, $(<) is
bin/gcc/debug/link-static/file.c
and so when the compiler is called, I get this:

g++ -o bin/gcc/debug/link-static/file.o bin/gcc/debug/link-static/file.c

However, the header file that I need to include is in the source
directory. So I
need to add -I. to the command line; I guess that's <include>. as a
feature. But
I'm not sure how to do that since I'm not the one generating the rule to
compile
the .c file; boost.build is doing that for me.

I have tried looking at the documentation but wasn't able to find the
syntax for
this.

_______________________________________________
Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost-build


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