|
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
depending
> 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,
or
> 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] * http://www.boost-consulting.com
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