List Info

Thread: how to handle a strange generator?




how to handle a strange generator?
user name
2006-03-27 14:48:17
I've got a strange one-off generator that I don't know how
to deal with in
bb.  In gnu-make, it would be expressed like this:




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

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




"make_tables" is the code generator, a perl
script.  The names of the output
files are hard coded into the script, and it can take a
number of inputs of
various suffixes.

I tried to express it like this:




rule MT { Depends $1 : $2 ; }
actions MT
{
	make_tables $(<)
}
MT $(OUTPUTS) : $(INPUTS) ;

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?  Any suggestions on how
to go about
this?

Thanks,
Dan.

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
how to handle a strange generator?
user name
2006-03-27 15:06:28
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_pru
s.blogspot.com
Boost.Build V2: http://boost.org/boost-
build2
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
how to handle a strange generator?
user name
2006-03-31 22: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-bounceslists.boost.org
[mailto:boost-build-bounceslists.boost.org] 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_pru
s.blogspot.com
Boost.Build V2: http://boost.org/boost-
build2
_______________________________________________
Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost-build


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

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