aboutsummaryrefslogtreecommitdiff
path: root/src/buildparser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/buildparser.cpp')
-rw-r--r--src/buildparser.cpp43
1 files changed, 35 insertions, 8 deletions
diff --git a/src/buildparser.cpp b/src/buildparser.cpp
index f855990..6c3337f 100644
--- a/src/buildparser.cpp
+++ b/src/buildparser.cpp
@@ -121,7 +121,7 @@ void BuildParser::filterList()
121{ 121{
122 StringList lTmp2; 122 StringList lTmp2;
123 StringList lIn = buildToStringList( lTmp, StringList() ); 123 StringList lIn = buildToStringList( lTmp, StringList() );
124 pTmpFunc->execute( lIn, lTmp2 ); 124 pTmpFunc->execute( NULL, lIn, lTmp2 );
125 lTmp.clear(); 125 lTmp.clear();
126 for( StringList::iterator i = lTmp2.begin(); i != lTmp2.end(); i++ ) 126 for( StringList::iterator i = lTmp2.begin(); i != lTmp2.end(); i++ )
127 { 127 {
@@ -137,7 +137,7 @@ StringList BuildParser::buildToStringList( const BuildList &lSrc, const StringLi
137 { 137 {
138 if( (*i).second ) 138 if( (*i).second )
139 { 139 {
140 (*i).second->execute( lIn, lOut ); 140 (*i).second->execute( NULL, lIn, lOut );
141 } 141 }
142 else 142 else
143 { 143 {
@@ -155,6 +155,7 @@ void BuildParser::addRule( const char *sName )
155{ 155{
156 lRuleTmp.push_back( RuleInfo() ); 156 lRuleTmp.push_back( RuleInfo() );
157 lRuleTmp.back().sName = sName; 157 lRuleTmp.back().sName = sName;
158 lRuleTmp.back().pAggregate = NULL;
158} 159}
159 160
160void BuildParser::addRuleMatches() 161void BuildParser::addRuleMatches()
@@ -188,6 +189,11 @@ void BuildParser::addRulePerform()
188 lRuleTmp.back().lPerform.push_back( pTmpPerform ); 189 lRuleTmp.back().lPerform.push_back( pTmpPerform );
189} 190}
190 191
192void BuildParser::setRuleAggregate()
193{
194 lRuleTmp.back().pAggregate = pTmpFunc;
195}
196
191// 197//
192// Perform functions 198// Perform functions
193// 199//
@@ -431,14 +437,35 @@ Build *BuildParser::genBuild()
431 pRule->getPerformList().push_back( *j ); 437 pRule->getPerformList().push_back( *j );
432 } 438 }
433 439
434 /*StringList lITmp = buildToStringList( 440 for( BuildList::iterator j = (*i).lProduces.begin();
435 (*i).lProduces, StringList() 441 j != (*i).lProduces.end(); j++ )
436 ); 442 {
443 if( (*j).second )
444 {
445 throw BuildException(
446 "You cannot have functions in produces lists (rule %s).",
447 (*i).sName.c_str() );
448 }
449 pRule->getProducesList().push_back( (*j).first );
450 }
437 451
438 for( StringList::iterator i = lITmp.begin(); i != lITmp.end(); i++ ) 452 if( (*i).pAggregate )
439 { 453 {
440 get 454 pRule->setAggregate( (*i).pAggregate );
441 }*/ 455 }
456
457 for( BuildList::iterator j = (*i).lRequires.begin();
458 j != (*i).lRequires.end(); j++ )
459 {
460 if( (*j).second )
461 {
462 pRule->getReqFuncList().push_back( (*j).second );
463 }
464 else
465 {
466 pRule->getReqStrList().push_back( (*j).first );
467 }
468 }
442 469
443 bld->addRule( pRule ); 470 bld->addRule( pRule );
444 } 471 }