|
Boost-Commit : |
From: steven_at_[hidden]
Date: 2008-07-17 23:25:21
Author: steven_watanabe
Date: 2008-07-17 23:25:20 EDT (Thu, 17 Jul 2008)
New Revision: 47537
URL: http://svn.boost.org/trac/boost/changeset/47537
Log:
Make c-scanner search directories specified
with <include>a&&b
* tools/buitin.jam
(c-scanner.__init__) split includes at &&
* test/test_all.py test/ordered_include.py
Test case for this fix.
Added:
trunk/tools/build/v2/test/ordered_include.py (contents, props changed)
Text files modified:
trunk/tools/build/v2/test/test_all.py | 1 +
trunk/tools/build/v2/tools/builtin.jam | 4 +++-
2 files changed, 4 insertions(+), 1 deletions(-)
Added: trunk/tools/build/v2/test/ordered_include.py
==============================================================================
--- (empty file)
+++ trunk/tools/build/v2/test/ordered_include.py 2008-07-17 23:25:20 EDT (Thu, 17 Jul 2008)
@@ -0,0 +1,43 @@
+#!/usr/bin/python
+#
+# Copyright (c) 2008 Steven Watanabe
+#
+# Distributed under the Boost Software License, Version 1.0. (See
+# accompanying file LICENSE_1_0.txt) or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+from BoostBuild import Tester
+
+tester = Tester()
+
+tester.write("Jamroot", """
+ obj test : test.cpp : <include>a&&b ;
+""")
+
+tester.write("test.cpp", """
+ #include <test1.hpp>
+ #include <test2.hpp>
+
+ int main() {
+ }
+""")
+
+tester.write("a/test1.hpp", """
+""")
+
+tester.write("b/test2.hpp", """
+""")
+
+tester.run_build_system()
+
+tester.expect_addition("bin/$toolset/debug/test.obj")
+
+tester.touch("a/test1.hpp")
+tester.run_build_system()
+tester.expect_touch("bin/$toolset/debug/test.obj")
+
+tester.touch("b/test2.hpp")
+tester.run_build_system()
+tester.expect_touch("bin/$toolset/debug/test.obj")
+
+tester.cleanup()
Modified: trunk/tools/build/v2/test/test_all.py
==============================================================================
--- trunk/tools/build/v2/test/test_all.py (original)
+++ trunk/tools/build/v2/test/test_all.py 2008-07-17 23:25:20 EDT (Thu, 17 Jul 2008)
@@ -169,6 +169,7 @@
"free_features_request",
"file_name_handling",
"sort_rule",
+ "ordered_include",
"inherited_dependency"
]
Modified: trunk/tools/build/v2/tools/builtin.jam
==============================================================================
--- trunk/tools/build/v2/tools/builtin.jam (original)
+++ trunk/tools/build/v2/tools/builtin.jam 2008-07-17 23:25:20 EDT (Thu, 17 Jul 2008)
@@ -386,6 +386,7 @@
import path ;
import regex ;
import scanner ;
+ import sequence ;
import virtual-target ;
rule __init__ ( includes * )
@@ -394,7 +395,8 @@
for local i in $(includes)
{
- self.includes += [ path.native $(i:G=) ] ;
+ self.includes += [ sequence.transform path.native
+ : [ regex.split $(i:G=) "&&" ] ] ;
}
}
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