Subject: [Boost-build] Generating multiple CPP/H targets from a single source
From: Tyson Marchuk (tmarchuk_at_[hidden])
Date: 2010-07-27 13:52:48
I'm trying to add a Boost.Build generator, to handle a code generator
tool, to my Boost.Build configuration. The code generator takes in a
single IDL, XML, XSD, or WSDL file and generates six CPP and H files,
three of each. I'm struggling with how to add this to Boost.Build. Do I
need to write a custom generator or can I just register a standard one
and add a rule/action?
Note that I'm using Boost Build version 2 milestone 10 so perhaps I need
to upgrade to get this to work?
I tried the following (and a few variations):
type MYGEN : idl xml xsd wsdl ;
generators.register-standard mytype.mygen : MYGEN : CPP CPP(%Plugin) CPP
(%Support) H H(%Plugin) H(%Support) ;
rule mygen ( targets + : source : properties * )
DEPENDS $(targets) : $(source) ;
mygenExecutable -commandLineOptions $(<:D) $(>)
My Jamfile contains:
This gets stuck in generators.jam:1088 in construct-really with error:
Ambiguity found when searching for best transformation
I added a bunch of debugging statements to the various builtin Jam files
and it seems like Boost.Build is trying to make an EXE from AFile.idl
and AnotherFile.cxx which is correct. It then drills down into AFile.idl
and says it's using the LIB generator (not sure why it would do that??)
Tries to construct the LIB from an OBJ and the OBJ from a CPP, etc. It
eventually dies when it tries to find a generator for an H.
I'm not really sure what the proper way to do what I want is. Perhaps
there's an example somewhere of how to do something similar I can learn
from? I don't see anything similar in the examples included with
milestone 10 but maybe I just missed it?
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