diff options
author | Mike Buland <eichlan@xagasoft.com> | 2006-09-12 00:22:33 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2006-09-12 00:22:33 +0000 |
commit | d19ada0aa88aba1c7b439035c0028440ac860ec3 (patch) | |
tree | fb8cde98650aa66fcdb736b045f541eac1b8b93a /src/buildparser.cpp | |
parent | 97d529fac68105f0d3d34c699a4ac10489c705e8 (diff) | |
download | build-d19ada0aa88aba1c7b439035c0028440ac860ec3.tar.gz build-d19ada0aa88aba1c7b439035c0028440ac860ec3.tar.bz2 build-d19ada0aa88aba1c7b439035c0028440ac860ec3.tar.xz build-d19ada0aa88aba1c7b439035c0028440ac860ec3.zip |
Build now builds, it has viewers, and dependancy checking, and everything works.
Now we have to add cleaning, caching, and more viewer hooks / viewers.
Diffstat (limited to '')
-rw-r--r-- | src/buildparser.cpp | 43 |
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 | ||
160 | void BuildParser::addRuleMatches() | 161 | void 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 | ||
192 | void 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 | } |