diff options
Diffstat (limited to 'src/rule.cpp')
-rw-r--r-- | src/rule.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/rule.cpp b/src/rule.cpp index dcf62d4..f1b0317 100644 --- a/src/rule.cpp +++ b/src/rule.cpp | |||
@@ -70,7 +70,9 @@ StringList Rule::execute( Build &bld, StringList &lInput, PerformList &lPerf ) | |||
70 | for( PerformList::iterator k = lPerform.begin(); | 70 | for( PerformList::iterator k = lPerform.begin(); |
71 | k != lPerform.end(); k++ ) | 71 | k != lPerform.end(); k++ ) |
72 | { | 72 | { |
73 | Perform *p = (*k)->duplicate( bld, target, &mTmp ); | 73 | StringList cont; |
74 | cont.push_front( target ); | ||
75 | Perform *p = (*k)->duplicate( bld, &cont, &mTmp ); | ||
74 | p->setTarget( target ); | 76 | p->setTarget( target ); |
75 | p->setRule( sName ); | 77 | p->setRule( sName ); |
76 | //p->setReqFuncs( &lReqFuncs ); | 78 | //p->setReqFuncs( &lReqFuncs ); |
@@ -86,7 +88,9 @@ StringList Rule::execute( Build &bld, StringList &lInput, PerformList &lPerf ) | |||
86 | StringList::iterator j = lProduces.begin(); | 88 | StringList::iterator j = lProduces.begin(); |
87 | { | 89 | { |
88 | VarMap mTmp; | 90 | VarMap mTmp; |
89 | std::string target = bld.replVars( (*j), (*i), NULL ); | 91 | StringList cont; |
92 | cont.push_front( (*i) ); | ||
93 | std::string target = bld.replVars( (*j), &cont, NULL ); | ||
90 | mTmp["target"] = target; | 94 | mTmp["target"] = target; |
91 | lNewOut.push_back( target ); | 95 | lNewOut.push_back( target ); |
92 | mTmp["match"] = (*i); | 96 | mTmp["match"] = (*i); |
@@ -99,14 +103,17 @@ StringList Rule::execute( Build &bld, StringList &lInput, PerformList &lPerf ) | |||
99 | for( PerformList::iterator k = lPerform.begin(); | 103 | for( PerformList::iterator k = lPerform.begin(); |
100 | k != lPerform.end(); k++ ) | 104 | k != lPerform.end(); k++ ) |
101 | { | 105 | { |
102 | Perform *p = (*k)->duplicate( bld, target, &mTmp ); | 106 | StringList cont2; |
107 | cont2.push_front( (*i) ); | ||
108 | cont2.push_front( target ); | ||
109 | Perform *p = (*k)->duplicate( bld, &cont2, &mTmp ); | ||
103 | p->setTarget( target ); | 110 | p->setTarget( target ); |
104 | p->setRule( sName ); | 111 | p->setRule( sName ); |
105 | for( FunctionList::iterator f = lReqFuncs.begin(); | 112 | for( FunctionList::iterator f = lReqFuncs.begin(); |
106 | f != lReqFuncs.end(); f++ ) | 113 | f != lReqFuncs.end(); f++ ) |
107 | { | 114 | { |
108 | p->getReqFuncs().push_back( | 115 | p->getReqFuncs().push_back( |
109 | (*f)->duplicate( bld, target, &mTmp ) | 116 | (*f)->duplicate( bld, &cont2, &mTmp ) |
110 | ); | 117 | ); |
111 | } | 118 | } |
112 | lPerf.push_back( p ); | 119 | lPerf.push_back( p ); |