Boost logo

Boost-Build :

Subject: [Boost-build] Unknow target type RC2
From: Sherwood Hu (sherwood_at_[hidden])
Date: 2009-01-15 13:13:25


Hi all,

I am new to boost.build - I am trying to write a jam file for a MFC
project. The project has a .rc file, which includes another .rc2 file
under 'res' directory. Just like what a typical MFC Project look like.

We require that this .rc2 is generated dynamically. In the existing
makefile, this is a simple line:

res/PRJNAME.rc2 : res/PRJNAME.rc2.php
        php res/PRJNAME.rc2.php > res/PRJNAME.rc2

I read the boost.build v2 manual, and it seemed to me that the only way
is to write an extender, and I did:

Rc2-php.jam
=======

import type ;

type.register RC2PHP : rc2-php ;

import generators ;

generators.register-standard rc2-php.inline-file : RC2PHP : RC2 ;

actions inline-file
{
        php $(>) > $(<)
}

import scanner ;

class rc2-php-scanner : common-scanner
{
        rule pattern ( )
        {
                return "require_once\(\"([^\"]*)\"\);" ;
        }
}

scanner.register rc2-php-scanner : include ;

type.set-scanner RC2PHP : rc2-php-scanner ;

==========================================

However, when I ran the bjam, it reported an error "Unknown target type
RC2".

Your opinion is greatly appreciated.


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