aboutsummaryrefslogtreecommitdiff
path: root/src/rule.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2009-12-21 23:52:22 +0000
committerMike Buland <eichlan@xagasoft.com>2009-12-21 23:52:22 +0000
commitb87c8d2eb4f0c7fb25cee10e8fdb2c8331343f8c (patch)
treedfd82e31b0da2e48482f00fb3061dfdcd61e7c9d /src/rule.cpp
parent97c0fcbbef19012f825cba0fc3f16037322ce84c (diff)
downloadbuild-b87c8d2eb4f0c7fb25cee10e8fdb2c8331343f8c.tar.gz
build-b87c8d2eb4f0c7fb25cee10e8fdb2c8331343f8c.tar.bz2
build-b87c8d2eb4f0c7fb25cee10e8fdb2c8331343f8c.tar.xz
build-b87c8d2eb4f0c7fb25cee10e8fdb2c8331343f8c.zip
Wow, that was aweful. There was a horrible problem with rule generated targets
not getting the variables from the parent target.
Diffstat (limited to '')
-rw-r--r--src/rule.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rule.cpp b/src/rule.cpp
index 4c42346..7578707 100644
--- a/src/rule.cpp
+++ b/src/rule.cpp
@@ -73,9 +73,10 @@ void Rule::prepTarget( class Target *pTarget )
73 } 73 }
74} 74}
75 75
76Target *Rule::createTarget( class Runner &r, const Bu::FString &sInput ) 76Target *Rule::createTarget( class Runner &r, const Bu::FString &sInput,
77 Target *pParent )
77{ 78{
78 r.getContext().pushScope(); 79 r.getContext().pushScope( pParent->getVars() );
79 r.getContext().addVariable("INPUT", sInput ); 80 r.getContext().addVariable("INPUT", sInput );
80 Target *pTrg = new Target( false ); 81 Target *pTrg = new Target( false );
81 for( AstBranchList::iterator i = lOutput.begin(); i; i++ ) 82 for( AstBranchList::iterator i = lOutput.begin(); i; i++ )