Boost logo

Boost-Build :

Subject: [Boost-build] how to use exe target from generator tool
From: George Georgiev (george.georgiev.sf_at_[hidden])
Date: 2012-02-25 22:42:04


Hi,

I am Boost.Build newbie. I have project that is generator itself. And
I have second project that should use the just compiled generator tool
to produce cpp and header files.

My generation jam code so far looks like:

////////////////  jamcompil ////////////////

rule generate ( target : source * : properties * )

{

    echo $(target) $(source) ;

}

actions generate

{

    generator $(<) $(>)

}

//////////////// jamfile ////////////////

import type ;

import scanner ;

import generators ;

import jamcompil ;

type.register COMPIL : compil ;

class compil-scanner : common-scanner

{

    rule pattern ( )

    {

        return "[ \t]*import[ \t]*\"([^\"]*)\"[ \t]*;" ;

    }

}

scanner.register compil-scanner : include ;

type.set-scanner COMPIL : compil-scanner ;

generators.register-standard jamcompil.generate : COMPIL : CPP ;

I cannot find how to specify the jamcompil generate actions to use the
executable compiled from the other project. How it to take the
executable from the exact location and how to make the target to
depend on it - if it is updated this to cause the targets to be
regenerated

Thank you,

George


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