Boost logo

Boost-Build :

Subject: [Boost-build] Changed behaviour of custom generators?
From: Roland Schwarz (roland.schwarz_at_[hidden])
Date: 2014-04-01 08:14:19

I ran into problem with boost-build when upgrading from 1.53 to 1.55:

In my project I am using a custom generator like described in the
extender section of the manual.

The definition of my generator (producing a CPP and a HPP file) goes
like so:

type.register PKGSPEC : psp ;

class pkgspec-generator-cpp : generator
     import property-set ;

     rule __init__ (
         id composing ?
         : source-types *
         : target-types-and-names +
         : requirements * )
             $(id) $(composing)
             : $(source-types)
             : $(target-types-and-names)
             : $(requirements)

     rule generated-targets ( sources + : propset : project name ? )
         # remove irrelevant features, i.e. all, since pkgspec does not
         # generate code that is dependant on any of those
         return [ generator.generated-targets
                 : [ property-set.empty ]
                 : $(project) $(name)
             ] ;

generators.register [ new pkgspec-generator-cpp pkgspec.generate-cpp :

I was able to use the generator in my files like so:

cpp detail/dataspec
     : dataspec.psp

lib blocklib
     : main.cpp
     : <dependency>detail/dataspec
      : <dependency>detail/dataspec

Now is where my problem comes: when the build tree initially is empty I
get errors:

don't know how to make
don't know how to make
don't know how to make
don't know how to make
(repeats total of 6)

and later failed builds due to lack of the datapspec files.

Now the interseting part: During the failed build my generator runs and
creates the missing files, where on second build invocation no "don't
knows" and missing files any more.

I hope someone (who changed the code) will be able to help!

Regards and thank you,

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at