2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-17 01:32:12 +00:00

Made 'include' adjustment for generated headers work when other

targets are specified as sources, not only as dependency properties.

    * new/virtual-target.jam (subvariant-dg): Note which sources
    are roots of dependency grapgs and record those graphs.


[SVN r16095]
This commit is contained in:
Vladimir Prus
2002-11-04 17:24:41 +00:00
parent 9313cb2851
commit f9bf8ef5e2
10 changed files with 60 additions and 2 deletions

View File

@@ -569,6 +569,17 @@ local rule subvariant-dg ( main-target : properties * : virtual-targets * )
for local d in [ $(t).dependencies ]
{
self.other-dg += [ $(d).dg ] ;
}
local a = [ $(t).action ] ;
if $(a)
{
for local s in [ $(a).sources ]
{
if [ $(s).root ]
{
self.other-dg += [ $(s).dg ] ;
}
}
}
}
self.other-dg = [ sequence.unique $(self.other-dg) ] ;

View File

@@ -19,5 +19,15 @@ exe c
: c.cpp
: <define>FOO <dependency>a
;
# Try the same as above, only when other target is specified
# not as dependency, but as source
lib d
: y.foo
;
#DEPENDS tra-ra : <./gcc/debug/shared-false/threading-single>x.h ;
exe e
: e.cpp d
: <define>FOO
;

View File

@@ -0,0 +1,6 @@
#include "x.h"
int main()
{
}

View File

View File

@@ -9,6 +9,8 @@ t.run_build_system()
# Check that main target 'c' was able to find 'x.h' from
# 'a's dependency graph
t.expect_addition("bin/gcc/debug/main-target-c/c")
# Check that main target 'e' was able to find 'y.h'
t.expect_addition("bin/gcc/debug/main-target-e/e")
# Check handling of first level includes.

View File

@@ -569,6 +569,17 @@ local rule subvariant-dg ( main-target : properties * : virtual-targets * )
for local d in [ $(t).dependencies ]
{
self.other-dg += [ $(d).dg ] ;
}
local a = [ $(t).action ] ;
if $(a)
{
for local s in [ $(a).sources ]
{
if [ $(s).root ]
{
self.other-dg += [ $(s).dg ] ;
}
}
}
}
self.other-dg = [ sequence.unique $(self.other-dg) ] ;

View File

@@ -19,5 +19,15 @@ exe c
: c.cpp
: <define>FOO <dependency>a
;
# Try the same as above, only when other target is specified
# not as dependency, but as source
lib d
: y.foo
;
#DEPENDS tra-ra : <./gcc/debug/shared-false/threading-single>x.h ;
exe e
: e.cpp d
: <define>FOO
;

View File

@@ -0,0 +1,6 @@
#include "x.h"
int main()
{
}

View File

View File

@@ -9,6 +9,8 @@ t.run_build_system()
# Check that main target 'c' was able to find 'x.h' from
# 'a's dependency graph
t.expect_addition("bin/gcc/debug/main-target-c/c")
# Check that main target 'e' was able to find 'y.h'
t.expect_addition("bin/gcc/debug/main-target-e/e")
# Check handling of first level includes.