|
Boost-Build : |
From: Dave Rahardja (drahardja_at_[hidden])
Date: 2007-04-03 02:17:08
How come path.glob works from the path of the Jamfile that is used from the
command line, instead of from the path of the Jamfile it is in?
For example, in my project:
+ [root]
+-- Jamroot
|
+---+ [lib-a]
| +-- Jamfile
| +---+ [source]
|
+---+ [app]
+-- Jamfile
----- /lib-a/Jamfile -----
import path : glob ;
local SOURCE_DIR = source ;
local SOURCES = [ glob SOURCE_DIR : *.c *.cpp ] ;
lib lib-a : SOURCES ;
----- /app/Jamfile -----
local SOURCES = myfile.cpp ;
exe app : SOURCES /lib-a ;
-----
When I invoke bjam in the /app directory, the glob rule in lib-a/Jamfile
appears to be invoked to use the /app directory, instead of the /lib-a
directory, thus causing the rule to return the null list.
This appears to be incorrect behavior. Or am I mistaken?
I've gotten around this by declaring the SOURCE_DIR as path-constant. Is
there a better way?
-dr
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