From 2ba321d25235cf3809dcb3a13079404b457ae4e7 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Tue, 28 Jan 2003 15:40:25 +0000 Subject: [PATCH] Bugfix: quoted includes were not handled correctly in some cases. [SVN r17067] --- new/builtin.jam | 2 +- test/dependency-test/src1/b.h | 1 + test/dependency-test/src1/c.h | 0 test/dependency_test.py | 6 ++++++ test/module_actions.pyc | Bin 122 -> 1024 bytes v2/test/dependency-test/src1/b.h | 1 + v2/test/dependency-test/src1/c.h | 0 v2/test/dependency_test.py | 6 ++++++ v2/test/module_actions.pyc | Bin 122 -> 1024 bytes v2/tools/builtin.jam | 2 +- 10 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 test/dependency-test/src1/c.h create mode 100644 v2/test/dependency-test/src1/c.h diff --git a/new/builtin.jam b/new/builtin.jam index c6870b97c..62a1787db 100644 --- a/new/builtin.jam +++ b/new/builtin.jam @@ -270,7 +270,7 @@ rule c-scanner ( includes * ) # Just propagate current scanner to includes, in a hope # that includes do not change scanners. - for local a in $(angle) + for local a in $(angle) $(quoted) { scanner.install $(__name__) : $(a) : $(target) ; } diff --git a/test/dependency-test/src1/b.h b/test/dependency-test/src1/b.h index 8b1378917..5af1f02bc 100644 --- a/test/dependency-test/src1/b.h +++ b/test/dependency-test/src1/b.h @@ -1 +1,2 @@ +#include "c.h" diff --git a/test/dependency-test/src1/c.h b/test/dependency-test/src1/c.h new file mode 100644 index 000000000..e69de29bb diff --git a/test/dependency_test.py b/test/dependency_test.py index 25004c09a..61326ce66 100644 --- a/test/dependency_test.py +++ b/test/dependency_test.py @@ -42,6 +42,12 @@ t.expect_touch("bin/gcc/debug/a.o") t.expect_touch("bin/gcc/debug/main-target-c/c" + exe_suffix) t.expect_nothing_more() +# included by "src/b.h". We had a bug: file included via "", +# like "b.h" is in this case was not scanned at all. +t.touch("src1/c.h") +t.run_build_system() +t.expect_touch("bin/gcc/debug/a" + exe_suffix) + t.touch("b.h") t.run_build_system() t.expect_nothing_more() diff --git a/test/module_actions.pyc b/test/module_actions.pyc index d9a2bd1ddc56c65f843de1ca8b9ea11ff454d3ca..c40fcb0fdbde35d89c873873578c06a754dc942f 100644 GIT binary patch literal 1024 zcmdOW%geQh&A=|1fq{X6g@J*g_!9#ILp=jSJu^cJ14A|gLk=TD6eB|p6GIde17kf4 zLkc59HZwyMGebQqn9afv#lld}&XCH&kjcuB!o<+b$PmTGP|pDqVFrt^Gt_f2q%txz zGcZJPFx2xfq;fE1ax$c_fMgl#`501I8KSrt>ZKV{nHe&<8B*97vX~k2O&A#KWxyu! zFr>0Eq_8ujaxpYBgO$p{#Mv2AI1u7_j0}wR3Sjej8B#dG5)6!t^(tT?K9CC->s7%V zelRD6ks(-vi-Cbbg9#J>YzzzxA*sbBsYS)00P)EzF7Yd7Wnf^4QHW8{28+cgXmb_w zF)%RX=BJeAr0OOnmt^MW6&Fh~GB7ymB_@|Blo(nmC@4f2>XsNPfB=^h7U2jZT_*(v z1ujet5k|V{Ir&M6IUqxfVQem_*+x*a9YL~2x+O*+L!cIb%1_lK%$yE#r z>*A7>{L&H)0Z`b3V!BF(=4` zg2d$1;`pM}Vj%_whLWPh%$&@;^!Q@9Fv#|jVh)hf)ROp;qSRC{C$*v=HMt};1suJ3 ziMgr8%pfJDNyQ*{6_w`2CxKiPUtC#SlA2pA%)r0^(Gs7RUy=c`A~zrAoSf9eywU;< zupJ;j6LJhF5TL#U>4BIFbqXl;p?M5sWPY&*D8qt@VnKL9jE5#fy@E<`0NXP&6iYEM gFi0};F!C@7F$yv9FbObm@(MFbFv>6sv+yzk07EX{9smFU delta 86 zcmZqRs1nkB%f)*^$1a(Hfq{XUfq|j8Yof4@4HH8)3quYoLli3mV?8@VDkDQP149%W mLp>)$DjP#4J3|UHLo*`-V?7U;&%uzw!jQts(9FQdSPuZWb`FaG diff --git a/v2/test/dependency-test/src1/b.h b/v2/test/dependency-test/src1/b.h index 8b1378917..5af1f02bc 100644 --- a/v2/test/dependency-test/src1/b.h +++ b/v2/test/dependency-test/src1/b.h @@ -1 +1,2 @@ +#include "c.h" diff --git a/v2/test/dependency-test/src1/c.h b/v2/test/dependency-test/src1/c.h new file mode 100644 index 000000000..e69de29bb diff --git a/v2/test/dependency_test.py b/v2/test/dependency_test.py index 25004c09a..61326ce66 100644 --- a/v2/test/dependency_test.py +++ b/v2/test/dependency_test.py @@ -42,6 +42,12 @@ t.expect_touch("bin/gcc/debug/a.o") t.expect_touch("bin/gcc/debug/main-target-c/c" + exe_suffix) t.expect_nothing_more() +# included by "src/b.h". We had a bug: file included via "", +# like "b.h" is in this case was not scanned at all. +t.touch("src1/c.h") +t.run_build_system() +t.expect_touch("bin/gcc/debug/a" + exe_suffix) + t.touch("b.h") t.run_build_system() t.expect_nothing_more() diff --git a/v2/test/module_actions.pyc b/v2/test/module_actions.pyc index d9a2bd1ddc56c65f843de1ca8b9ea11ff454d3ca..c40fcb0fdbde35d89c873873578c06a754dc942f 100644 GIT binary patch literal 1024 zcmdOW%geQh&A=|1fq{X6g@J*g_!9#ILp=jSJu^cJ14A|gLk=TD6eB|p6GIde17kf4 zLkc59HZwyMGebQqn9afv#lld}&XCH&kjcuB!o<+b$PmTGP|pDqVFrt^Gt_f2q%txz zGcZJPFx2xfq;fE1ax$c_fMgl#`501I8KSrt>ZKV{nHe&<8B*97vX~k2O&A#KWxyu! zFr>0Eq_8ujaxpYBgO$p{#Mv2AI1u7_j0}wR3Sjej8B#dG5)6!t^(tT?K9CC->s7%V zelRD6ks(-vi-Cbbg9#J>YzzzxA*sbBsYS)00P)EzF7Yd7Wnf^4QHW8{28+cgXmb_w zF)%RX=BJeAr0OOnmt^MW6&Fh~GB7ymB_@|Blo(nmC@4f2>XsNPfB=^h7U2jZT_*(v z1ujet5k|V{Ir&M6IUqxfVQem_*+x*a9YL~2x+O*+L!cIb%1_lK%$yE#r z>*A7>{L&H)0Z`b3V!BF(=4` zg2d$1;`pM}Vj%_whLWPh%$&@;^!Q@9Fv#|jVh)hf)ROp;qSRC{C$*v=HMt};1suJ3 ziMgr8%pfJDNyQ*{6_w`2CxKiPUtC#SlA2pA%)r0^(Gs7RUy=c`A~zrAoSf9eywU;< zupJ;j6LJhF5TL#U>4BIFbqXl;p?M5sWPY&*D8qt@VnKL9jE5#fy@E<`0NXP&6iYEM gFi0};F!C@7F$yv9FbObm@(MFbFv>6sv+yzk07EX{9smFU delta 86 zcmZqRs1nkB%f)*^$1a(Hfq{XUfq|j8Yof4@4HH8)3quYoLli3mV?8@VDkDQP149%W mLp>)$DjP#4J3|UHLo*`-V?7U;&%uzw!jQts(9FQdSPuZWb`FaG diff --git a/v2/tools/builtin.jam b/v2/tools/builtin.jam index c6870b97c..62a1787db 100644 --- a/v2/tools/builtin.jam +++ b/v2/tools/builtin.jam @@ -270,7 +270,7 @@ rule c-scanner ( includes * ) # Just propagate current scanner to includes, in a hope # that includes do not change scanners. - for local a in $(angle) + for local a in $(angle) $(quoted) { scanner.install $(__name__) : $(a) : $(target) ; }