Boost logo

Boost-Build :

From: David Abrahams (dave_at_[hidden])
Date: 2002-08-27 01:43:42

From: "Patrick Frants" <gclbb-jamboost_at_[hidden]>

> Hi,
> I have the following directory structure:
> c:/Project/
> Exe1/
> Jamfile2
> Jamfile1
> The real names of Jamfile1 and Jamfile2 are of course Jamfile. Jamfile1
> reads:
> project-root ;
> subinclude Exe1 ;
> And in Jamfile2 I use the Glob rule. When I execute bjam from the
> c:/Project directory the path I give to Glob should be relative to
> c:/Project, but when I execute bjam from c:/Project/Exe1 it should be
> relative to that directory. So I get different results from Glob
> on the directory from where I execute bjam! Why is that?
> Shouldn't Glob always act relative to the directory of it's own Jamfile,
> should I use absolute paths instead?

Neither ;-)

> How can I get the absolute path of the current Jamfile?

You should use the relative path from the invocation directory. You can get
the relative path from the invocation directory to the current subproject
(Jamfile) by using the $(SUBDIR) variable. So:

[ GLOB $(SUBDIR)/more/path/elements : *.cpp ]

Should get you what you're after.

David Abrahams * Boost Consulting
dave_at_[hidden] *


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