From: Daniel Schlyder (daniel_at_[hidden])
Date: 2004-04-23 01:49:10
> There are two ways...
> 1. If you add the build subdir to BOOST_BUILD_PATH you can just do:
> import bar ;
I tried the following in Jamrules, but it didn't work:
root = [ PWD ] ;
BOOST_BUILD_PATH = $(BOOST_ROOT)/tools/build/v1 $(root)$(SLASH)build ;
Not sure that is what you meant.
> 2. You can use relative paths, but only if you use it in a Jamfile:
> import ./bar ;
Ok, that's no good then.
Sorry, I probably didn't explain what I wanted to do properly.
The idea is to have a directory of .jam files extending Boost.Build
functionality and I'd like the internal dependencies between files in this
directory to be maintained by import'ing requirements for one file in another
using relative paths so I, in Jamrules, can import only the rules used directly
in my Jamfile's and be able to move the entire directory to another location
for other projects.
Anyway, after trying to modify BOOST_BUILD_PATH, I got the idea that maybe I
could use GLOB to fetch all the files, and sure enough,
import [ GLOB build : *.jam ] ;
works perfectly. Feels a bit ugly to just import everything, then again, I
don't plan to write that many extensions. :)
Maybe it would be a good idea, though, to make import search for the target in
directory of "includer", as a last resort.
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