Index: build/virtual-target.jam =================================================================== RCS file: /cvsroot/boost/boost/tools/build/v2/build/virtual-target.jam,v retrieving revision 1.110 diff -u -r1.110 virtual-target.jam --- build/virtual-target.jam 7 Nov 2005 07:27:02 -0000 1.110 +++ build/virtual-target.jam 23 Nov 2005 16:08:30 -0000 @@ -770,6 +770,25 @@ } } +# Class which acts exactly like 'action', except that the sources +# are not scanned for dependencies. +class non-scanning-action : action +{ + rule __init__ ( sources * : action-name + : property-set ? ) + { + action.__init__ $(sources) : $(action-name) : $(property-set) ; + } + rule actualize-source-type ( sources * : property-set ) + { + local result ; + for local i in $(sources) + { + result += [ $(i).actualize ] ; + } + return $(result) ; + } +} + # Creates a virtual target with approariate name and type from 'file'. # If a target with that name in that project was already created, returns that already Index: test/stage.py =================================================================== RCS file: /cvsroot/boost/boost/tools/build/v2/test/stage.py,v retrieving revision 1.22 diff -u -r1.22 stage.py --- test/stage.py 27 Jun 2005 12:19:49 -0000 1.22 +++ test/stage.py 23 Nov 2005 16:08:30 -0000 @@ -210,6 +210,24 @@ t.run_build_system(subdir="sub") t.expect_addition("dist2/b/c.h") +# Test that when installing .cpp files, we don't scan +# include dependencies. +t.rm(".") +t.write("Jamroot", """ +install dist : a.cpp ; +""") +t.write("a.cpp", """ +#include "a.h" +""") +t.write("a.h", "") +t.run_build_system() +t.expect_addition("dist/a.cpp") + +t.touch("a.h") +t.run_build_system() +t.expect_nothing("dist/a.cpp") + + Index: tools/stage.jam =================================================================== RCS file: /cvsroot/boost/boost/tools/build/v2/tools/stage.jam,v retrieving revision 1.72 diff -u -r1.72 stage.jam --- tools/stage.jam 8 Sep 2005 09:21:58 -0000 1.72 +++ tools/stage.jam 23 Nov 2005 16:08:30 -0000 @@ -250,7 +250,8 @@ local targets ; local name = [ $(source).name ] ; - new-a = [ new action $(source) : common.copy : $(properties) ] ; + new-a = [ + new non-scanning-action $(source) : common.copy : $(properties) ] ; local source-root = [ $(properties).get ] ; if $(source-root) {