[Boost.Build v2] Incorrectly handled header dependencies

I'm using the CVS version of Boost.Build on WinXP. Consider the following project: top/ | +-- include/ | | | +-- dir/ | | | +--header.h +-- Jamroot +-- main.cxx // -- main.cxx #include <dir/header.h> int main() { return 0; } # -- Jamroot path-constant TOP : . ; exe app : main.cxx : <include>$(TOP)/include ; Modification of header.h does not invoke the app target. I'm not familiar with bjam at all, but there is one thing I noticed and which might be relevant. When bjam is run with -d7 the include directory appears in the bjam's output with leading '/' and 'header.h' itself is labeled as missing: set SEARCH = /c:/Temp/bb2/include set HDRSCAN = #[ t]*include[ ]*(<(.*)>|"(.*)") set SCANNER = object(c-scanner)@45 set HDRRULE = scanner.hdrrule set HDRGRIST = object(c-scanner)@45 build file: root = '/c:/Temp/bb2/include' dir = 'dir' base = 'header' search <object(c-scanner)@45>dir/header.h: /c:/Temp/bb2/include\dir/header.h build file: dir = '\c:\temp\bb2\include\dir' build file: dir = 'dir' base = 'header' search <object(c-scanner)@45>dir/header.h: dir/header.h build file: dir = 'dir' set SEARCH = set HDRSCAN = set SCANNER = set HDRRULE = set HDRGRIST = bind -- <object(c-scanner)@45>dir/header.h: dir/header.h time -- <object(c-scanner)@45>dir/header.h: missing made stable <object(c-scanner)@45>dir/header.h made* newer <p.-object(c-scanner)@45>main.cxx made+ update <pbin\msvc\debug>main.obj made+ update <pbin\msvc\debug>app.exe made update all -- Jarda

Hi Jaroslav,
// -- main.cxx #include <dir/header.h>
int main() { return 0; }
# -- Jamroot path-constant TOP : . ; exe app : main.cxx : <include>$(TOP)/include ;
Modification of header.h does not invoke the app target.
That's indeed a Windows-specific bug in Boost.Build V2. I've just committed an initial fix and a testcase (that's revision 1.182 of tools/builtin.jam). If that's no convenient for you to get the CVS version, you can remove the $(TOP)/ part in Jamroot -- all paths are relative to Jamroot by default, and it's the $(TOP) that causes the bug. Thanks for reporting! Volodya
participants (2)
-
Jaroslav Gresula
-
Vladimir Prus