Boost logo

Boost-Build :

Subject: Re: [Boost-build] Forwarding <include> Requirements
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-01-08 17:21:53


AMDG

Brad Howes wrote:
>> I think this is what usage-requirements are for.
>
> I'm not in a project Jamfile, I am in a tool Jamfile that has a type
> generator and a corresponding action. You are right in that I am
> looking for something that will provide the same effect as manually
> adding an <include>/a/b/c to usage-requirements, but (1) the end user
> should not have to do this, the tool should automagically do it for
> him/her, and (2) the <include> path is dependent on the system's IDL
> installation which could change so I'd rather not have it hard-coded
> in project Jamfile files.

You can add usage-requirements in the generator's run rule.

class idl-generator : generator
{
    # ...
    rule run ( project name ? : property-set : sources + )
    {
        # ...
        result = [ generator.run $(project) $(name) : $(property-set) :
$(sources) ] ;
        return [ property-set.create <include>some/path ] $(result) ;
    }
}

In Christ,
Steven Watanabe


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