Boost logo

Boost-Build :

From: Fabien Chêne (fabien.chene_at_[hidden])
Date: 2006-11-04 16:15:54


Hi,

I am currently trying to move a project from Boost.Jam to
Boost.Build-V2. A major thing to do is to manage compilation and
dependancies of IDL files, using omniidl.

omniidl -Wba -bcxx invoked on an IDL file (saying foo.idl) generate 3
files : fooSK.h fooSK.cc fooDynSK.cc

Since I'm a newbie in bbv2, I try to go crescendo and start with a
standard generator. This is OK, but it compiles foo.o. To solve this
problem, I think I need to create a custom generator for that
(right?). I'm stuck at the following step, I copy-paste and adapt the
exemple given in the documentation, in a file named idl.jam:

#------------------------ idl.jam ----------------------------
import type ;
type.register IDL : idl ;

import generators ;

actions stub-skeleton-files
{
  "omniidl -Wba -bcxx" $(>)
}

class omniidl-generator : generator
{
    rule __init__ ( * : * )
    {
        generator.__init__ $(1) : $(2) : $(3) : $(4) : $(5) : $(6)
        : $(7) : $(8) : $(9) ;
    }
}

generators.register
[ new omniidl-generator idl.stub-skeleton-files : IDL : CPP ] ;
 
#---------------------------------------------------------

But bjam grouses and says:
« /home/fabien/prog/C++/Bjam/rep1/idl.jam:29:in load
rule new unknown in module idl. »

What is wrong with that ?

Otherwise, how can I tell bjam that a single IDL file will produce 2
CPP files and 1 CPP header file ? Have I got to modify the following
instruction (something like this) ?

generators.register
[ new omniidl-generator idl.stub-skeleton-files : IDL : CPP CPP HPP ] ;

Thanks in advance!

-- 
Fab

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