Boost logo

Boost-Build :

From: David Abrahams (dave_at_[hidden])
Date: 2002-11-13 10:37:25


Markus Schöpflin <markus.schoepflin_at_[hidden]> writes:

> I'm trying to write a utility rule that add some params before the
> actual rule gets called. Example:
>
> In "a/util.jam":
>
> rule my-unit-test ( name : sources + )
> {
> return [ unit-test $(name) : $(sources) <lib>test/foo ] ;
> }
>
> and in "a/b/Jamfile":
>
> include ../util.jam ;
> my-unit-test bar : bar.cpp ;
>
> This works but the test library foo is searched in "a/b/foo" and I
> want it to be seached in "a/foo". So, how can specify the path the
> test/foo relative to the Jamfile "util.jam" and not relativ to the
> Jamfile where the rule is used?

There is a way, but I don't remember offhand, and I'd have to do just
as much crawling around in the source as you would to find out. Check
the SubDir rule for hints, though.

HTH,

-- 
David Abrahams
dave_at_[hidden] * http://www.boost-consulting.com
Boost support, enhancements, training, and commercial distribution
 

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