Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r50390 - in trunk/tools/build/v2: test tools
From: steven_at_[hidden]
Date: 2008-12-27 15:31:16


Author: steven_watanabe
Date: 2008-12-27 15:31:15 EST (Sat, 27 Dec 2008)
New Revision: 50390
URL: http://svn.boost.org/trac/boost/changeset/50390

Log:
Make c-scanner use native path format for included headers in order to match the names of generated headers
Text files modified:
   trunk/tools/build/v2/test/implicit_dependency.py | 33 +++++++++++++++++++++++++++++++++
   trunk/tools/build/v2/tools/builtin.jam | 4 ++++
   2 files changed, 37 insertions(+), 0 deletions(-)

Modified: trunk/tools/build/v2/test/implicit_dependency.py
==============================================================================
--- trunk/tools/build/v2/test/implicit_dependency.py (original)
+++ trunk/tools/build/v2/test/implicit_dependency.py 2008-12-27 15:31:15 EST (Sat, 27 Dec 2008)
@@ -45,4 +45,37 @@
 
 t.expect_addition("bin/$toolset/debug/hello.exe")
 
+t.rm("bin")
+
+t.write("jamroot.jam", """
+make dir/a.h : : gen-header ;
+explicit dir/a.h ;
+
+exe hello : hello.cpp : <implicit-dependency>dir/a.h ;
+
+import os ;
+if [ os.name ] = NT
+{
+ actions gen-header
+ {
+ echo int i; > $(<)
+ }
+}
+else
+{
+ actions gen-header
+ {
+ echo "int i;" > $(<)
+ }
+}
+""")
+
+t.write("hello.cpp", """
+#include "dir/a.h"
+int main() { return i; }
+""")
+t.run_build_system()
+
+t.expect_addition("bin/$toolset/debug/hello.exe")
+
 t.cleanup()

Modified: trunk/tools/build/v2/tools/builtin.jam
==============================================================================
--- trunk/tools/build/v2/tools/builtin.jam (original)
+++ trunk/tools/build/v2/tools/builtin.jam 2008-12-27 15:31:15 EST (Sat, 27 Dec 2008)
@@ -15,11 +15,13 @@
 import generators ;
 import numbers ;
 import os ;
+import path ;
 import print ;
 import project ;
 import property ;
 import regex ;
 import scanner ;
+import sequence ;
 import stage ;
 import symlink ;
 import toolset ;
@@ -441,7 +443,9 @@
     rule process ( target : matches * : binding )
     {
         local angle = [ regex.transform $(matches) : "<(.*)>" ] ;
+ angle = [ sequence.transform path.native : $(angle) ] ;
         local quoted = [ regex.transform $(matches) : "\"(.*)\"" ] ;
+ quoted = [ sequence.transform path.native : $(quoted) ] ;
 
         # CONSIDER: the new scoping rule seem to defeat "on target" variables.
         local g = [ on $(target) return $(HDRGRIST) ] ;


Boost-Commit 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