|
Boost-Build : |
From: Roland Schwarz (roland.schwarz_at_[hidden])
Date: 2008-03-18 09:04:07
I am trying to introduce a code generator into my build chain,
but I have no idea how to make it work. The "mygenerator"
makes a *.hpp file from a *.psp file.
I can understand that the make rule will put the target into
a variant directory. But how shall I
1) tell the lib rule that it depends on the implicit generated.hpp
which is included by mysource.cpp and trigger an update?
(<dependecy> as shown does not work)
2) Tell the lib rule to add an include path to the variant
directory where the generated.hpp has been put
I must overlook something fundamental, since a similar scenario arises when
trying to use bison/yacc. Any help eagerly awaited.
project mylib
: usage-requirements <include>../../include
: requirements
<threading>multi
<include>../../include
: source-location ../../src
: default-build release
;
lib mylib
: mysource.cpp
: <dependency>generated.hpp
;
make generated.hpp
: generated.psp
: @mygenerator
;
actions mygenerator
{
mygenerator $(>) -o $(<)
}
Regards, Roland aka speedsnail
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