It seems that include paths that end with a directory name
completely
enclosed in (parentheses) will cause the previous directory
separator to be
dropped.
For instance:
----- Jamroot -----
local DIRS
= foo/(bar) # <--- here's the
problem
foo/(bar)/baz
foo/(bar
foo/bar)
foo/(bar)z
foo/z(bar)
;
exe foobar
: foo/(bar)/bar.cpp
: <include>$(DIRS)
;
----- mytool.jam -----
import feature ;
import toolset : flags ;
feature.extend toolset : mytool ;
rule init ( version ? : command * : options * )
{
}
generators.register-c-compiler mytool.compile.c++ : CPP :
OBJ :
<toolset>mytool ;
generators.register-linker mytool.link : OBJ : EXE :
<toolset>mytool ;
flags mytool.compile.c++ INCLUDES <include> ;
rule compile.c++ ( targets + : sources * : properties * )
{
}
rule link ( targets + : sources * : properties * )
{
}
actions together compile.c++
{
echo -I$(INCLUDES)
copy $(>) $(<)
}
actions link
{
copy $(>[1]) $(<)
}
---------------------------
Invoking the tool on the command line:
>bjam toolset=mytool -a
...found 8 targets...
...updating 2 targets...
mytool.compile.c++ binmytooldebugbar.obj
-Ifoo(bar) -Ifoo(bar -Ifoo(bar)baz -Ifoo(bar)z
-Ifoobar)
1 file(s) copied.
mytool.link binmytooldebugfoobar.exe
1 file(s) copied.
...updated 2 targets...
Notice that the first include statement has dropped the
backslash before
(bar), i.e. it should say -Ifoo(bar) instead of
-Ifoo(bar).
Note also that the problem only occurs if the ENTIRE last
component of the
path is enclosed in parentheses.
-dr
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
a>
|