Boost logo

Boost-Build :

From: Christopher Currie (Christopher_at_[hidden])
Date: 2003-05-23 16:38:02


All,

I'm having trouble using path-globals in template targets. I've got the
following tree:

root
+-foo
| `-foo.h
+-bar
| +-bar.cc
| `-Jamfile
+-boost-build.jam
+-Jamfile
`-Jamrules

My top-level Jamfile has:

project-root ;
subinclude bar ;

My top-level Jamrules has:

path-global FOODIR : $($(gTOP))/foo ;

My bar/Jamfile has:

subproject bar ;

template templ : bar.cc : <include>$(FOODIR) ;

lib bar : <template>templ ;

dll bar : <template>templ ;

Now, if I run bjam in the bar directory, everything is fine. If I run
bjam in the root directory, the path for $(FOODIR) dir doesn't get
adjusted properly. In order to be able to build in both locations
correctly, I have to put the includes on each target:

subproject bar ;

template templ : bar.cc ;

lib bar : <template>templ : <include>$(FOODIR) ;

dll bar : <template>templ : <include>$(FOODIR) ;

This will build properly both in root and bar. Is there something I'm
doing wrong w.r.t. either path-global or template that is preventing my
first attempt from building?

Thanks in advance,
Christopher

 


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