Boost logo

Boost-Build :

From: Ali Azarbayejani (ali_at_[hidden])
Date: 2003-03-12 11:46:29


Here is another bug associated with Conditional Properties. In this
case, a relative path from a sub-project is handled correctly for an
<include> property, but not if the <include> property is Conditional.

Here we have an exe "hello" (exe/Jamfile) depending on a lib "mylib"
from a different project (lib/mylib/Jamfile).

Target "mylib" requires two include paths, "../include/foo" and
"../include/bar", relative to the "mylib" project. The only
difference between the two include paths is that "../include/bar" is
Conditional and "../include/foo" is not (see lib/mylib/Jamfile).

When "mylib.o" is built from the "hello" project, the include path for
"foo" gets converted properly to its relative path from the "hello"
project. But the include path for "bar" does NOT!

The bjam output below is from running bjam in the "exe" directory.
Note that in the g++ command line, the "foo" path is properly
converted to "../lib/include/foo" (CORRECT) but the "bar" path remains
"../include" (WRONG!).

> bjam
...found 23 targets...
...updating 11 targets...
MkDir1 bin
MkDir1 bin/gcc
MkDir1 bin/gcc/debug
gcc.compile bin/gcc/debug/hello.o
MkDir1 ../lib/mylib/bin
MkDir1 ../lib/mylib/bin/gcc
MkDir1 ../lib/mylib/bin/gcc/debug
MkDir1 ../lib/mylib/bin/gcc/debug/main-target-mylib
gcc.compile ../lib/mylib/bin/gcc/debug/main-target-mylib/mylib.o
../lib/mylib/mylib.cxx:4:17: bar.h: No such file or directory

g++ -Wall -ftemplate-depth-100 -O0 -fno-inline -g
-I../include/bar -I../lib/include/foo
-I../lib/mylib/bin/gcc/debug/main-target-mylib -c -o
../lib/mylib/bin/gcc/debug/main-target-mylib/mylib.o
../lib/mylib/mylib.cxx

...failed gcc.compile
../lib/mylib/bin/gcc/debug/main-target-mylib/mylib.o...
...skipped
<..!lib!mylib/gcc/debug_at_../lib/mylib/bin/gcc/debug/main-target-mylib@/main-target-mylib>mylib.so
for lack of <..!lib!mylib/gcc/debug/main-target-mylib>mylib.o...
...skipped <./gcc/debug>hello for lack of
<..!lib!mylib/gcc/debug_at_../lib/mylib/bin/gcc/debug/main-target-mylib@/main-target-mylib>mylib.so...
...failed updating 1 target...
...skipped 2 targets...
...updated 8 targets... --------------8EB79B567D9B3D845D998F9A Content-Type: application/x-gzip;
name="relative-paths.tar.gz"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="relative-paths.tar.gz"

[Attachment content not displayed.] --------------8EB79B567D9B3D845D998F9A--


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