Boost logo

Boost-Build :

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


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

| `-foo.h
| `-Jamfile

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 : : <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 : ;

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,


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