|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r80186 - trunk/tools/build/v2/engine
From: jurko.gospodnetic_at_[hidden]
Date: 2012-08-24 22:52:05
Author: jurko
Date: 2012-08-24 22:52:04 EDT (Fri, 24 Aug 2012)
New Revision: 80186
URL: http://svn.boost.org/trac/boost/changeset/80186
Log:
Corrected Boost Jam's initial build to make --update builds correctly detect changes in included headers. Removed the need for literal tab characters embedded in the build script.
Text files modified:
trunk/tools/build/v2/engine/build.jam | 36 ++++++++++++++++++++----------------
1 files changed, 20 insertions(+), 16 deletions(-)
Modified: trunk/tools/build/v2/engine/build.jam
==============================================================================
--- trunk/tools/build/v2/engine/build.jam (original)
+++ trunk/tools/build/v2/engine/build.jam 2012-08-24 22:52:04 EDT (Fri, 24 Aug 2012)
@@ -787,23 +787,27 @@
# Scan sources for header dependencies.
-# WARNING: Yes those are *REAL TABS* below. DO NOT CHANGE, under any
-# circumstances, to spaces!! And the tabs indenting this are here so that if
-# someone is in the mood to replace tabs they hit this comment, and hopefully
-# notice their error.
-rule .scan
-{
- HDRRULE on $(<:D=) = .hdr.scan ;
- HDRSCAN on $(<:D=) = "^[ ]*#[ ]*include[ ]*([<\"][^\">]*[\">]).*$" ;
-}
-rule .hdr.scan
-{
- local hdrs = [ GLOB . : $(>:D=) ] ;
- INCLUDES $(<:D=) : $(hdrs:D=) ;
- HDRRULE on $(>:D=) = .hdr.scan ;
- HDRSCAN on $(>:D=) = "^[ ]*#[ ]*include[ ]*([<\"][^\">]*[\">]).*$" ;
+#
+# In order to keep things simple, we do not support include paths here. This
+# means our build will only detect changes in headers included relative to the
+# current folder as opposed to those included from somewhere on the include
+# path.
+rule .scan ( targets + )
+{
+ HDRRULE on $(targets) = .hdr.scan ;
+ HDRSCAN on $(targets) = "^[ \t]*#[ \t]*include[ \t]*\"([^\"]*)\".*$" ;
+}
+rule .hdr.scan ( target : includes * : binding )
+{
+ local target-path = [ NORMALIZE_PATH $(binding:D) ] ;
+ NOCARE $(includes) ;
+ INCLUDES $(target) : $(includes) ;
+ SEARCH on $(includes) = $(target-path) ;
+ ISFILE $(includes) ;
+ .scan $(includes) ;
}
-.scan [ GLOB . : *.c ] ;
+.scan $(jam.source) ;
+
# Distribution making from here on out. Assumes that the docs are already built
# as HTML at ../doc/html. Otherwise they will not be included in the built
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