|
Boost-Build : |
Subject: Re: [Boost-build] generating a header file
From: Jonathan Brannan (kickace_at_[hidden])
Date: 2010-11-01 13:30:59
hpp Foo : Foo.rbhpp ;
and having a <dependency>Foo did the trick.
If I put Foo.rbhpp (or Foo) in the sources I get a bunch of:
error: No best alternative for
Now I need to know how tell my object to look for the Foo.hpp header in the
correct build directory path. doing <include>Foo did not work, that just
came out to -I"Foo"
On Sat, Oct 23, 2010 at 5:12 AM, Vladimir Prus <ghost_at_[hidden]> wrote:
> On Monday, October 18, 2010 18:19:50 Jonathan Brannan wrote:
>
> Hi Jonathan,
>
> > I'm trying to get a rule to generate header files with ruby code.
> > Optimally I'd like to be able to generate a header and/or a cpp, but for
> > now a header will be fine. Generation of just a cpp worked as explained
> > in the documentation, however I was unable to get the the action rule for
> > the header file to be called:
> >
> > I was attempting something like:
> > import type ;
> > type.register RBHPP : rbhpp ;
> > actions make-header
> > {
> > ...
> > }
> >
> > generators.register-standard rbconvert.make-header : RBHPP : HPP ;
>
> Good so far -- you've told Boost.Build that whenever it wants to create HPP
> from RBHPP, it can use the 'make-header' action.
>
> >
> > Then I have a
> > obj Foo.o : Foo.cpp : <dependency>Foo.rbhpp ;
>
> This tells that Foo.o depends on file Foo.rbhpp, however,
> nothing above tells Boost.Build that file Foo.hpp should
> be produced.
>
> > If i touch Foo.rbhpp, it will rebuild Foo.cpp. However it will never try
> > and and execute the actions.
> >
> > If is replace s/hpp/cpp. It works as expected (putting Foo.rbcpp in the
> > sources location).
> >
> >
> > Do I need to use a more advanced generator class to make the actions to
> > execute?
>
> Just:
>
> hpp Foo : Foo.rphpp ;
>
> should do the trick. Or, you can put both Foo.cpp and Foo.rbhpp in the
> sources of whatever metarget uses them now.
>
> HTH,
>
>
> --
> Vladimir Prus
> http://vladimir_prus.blogspot.com
> Boost.Build: 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