Boost logo

Boost-Build :

From: Daniel Goertzen (daniel.goertzen_at_[hidden])
Date: 2006-03-31 17:14:34


Hello. The Boost.Build "make" rule doesn't seem to support multiple output
files that my generator will spit out; only a single target is supported.

For reference, the behaviour I'm shooting for in Makefile format is:

INPUTS=x.names y.tab z.tab
OUTPUTS=a.c a.h b.c b.h

$(OUTPUTS): $(INPUTS)
        make_tables $(INPUTS)

The tentative bb2 implementation is:

INPUTS = x.names y.tab z.tab ;
OUTPUTS = a.c a.h b.c b.h ;

rule MT { Depends $1 : $2 ; }
actions MT
{
        make_tables $(2)
}
make $(OUTPUTS) : $(INPUTS) : MT ; ***doesn't work, too many OUTPUTs***

A secondary problem is that the generator is going to create output amongst
the sources instead of in bin/gcc/debug. The good new is that the generator
does take an option as to which directory to place its outputs. The bad
news is that I don't know the magic invocation to get this directory:

actions MT
{
        make_tables -o $(something that resolves to
blah/blah/bin/gcc/debug/) $(2)
}

Suggestions?

Thanks,
Dan.

-----Original Message-----
From: boost-build-bounces_at_[hidden]
[mailto:boost-build-bounces_at_[hidden]] On Behalf Of Vladimir Prus
Sent: Monday, March 27, 2006 9:06 AM
To: Boost.Build developer's and user's list
Subject: Re: [Boost-build] how to handle a strange generator?

Hi Daniel,

> I tried to express it like this:
>
>
>
>
> rule MT { Depends $1 : $2 ; }
> actions MT
> {
> make_tables $(<)
> }
> MT $(OUTPUTS) : $(INPUTS) ;

Use

  make $(OUTPUTS) : $(INPUTS) : MT ;

> exe mytest : a.c ;
>
>
>
>
>
> But it complains about not being able to find "a.c". Perhaps I'm not
> allowed to mix classic Jam with bb?

Presecily. To invoke your custom 'action' on Boost.Build targets you need
the 'make' rule provided by Boost.Build

-- 
Vladimir Prus
http://vladimir_prus.blogspot.com
Boost.Build V2: http://boost.org/boost-build2
_______________________________________________
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