aboutsummaryrefslogtreecommitdiff
path: root/src/buildparser.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2007-04-24 15:43:35 +0000
committerMike Buland <eichlan@xagasoft.com>2007-04-24 15:43:35 +0000
commitf88e5c349ff0107ac4a13ae00180f767741f88d1 (patch)
tree26ecb2afe254f23ae9f57f701b67d41801c40c87 /src/buildparser.cpp
parentff938b977db21378a1f016f65e7345c50e71ef8f (diff)
downloadbuild-f88e5c349ff0107ac4a13ae00180f767741f88d1.tar.gz
build-f88e5c349ff0107ac4a13ae00180f767741f88d1.tar.bz2
build-f88e5c349ff0107ac4a13ae00180f767741f88d1.tar.xz
build-f88e5c349ff0107ac4a13ae00180f767741f88d1.zip
Build groups are finished, there may be more we could do with them, but they
work just fine for what I want. They're cute though, you can put each target in as many groups as you'd like.
Diffstat (limited to '')
-rw-r--r--src/buildparser.cpp41
1 files changed, 31 insertions, 10 deletions
diff --git a/src/buildparser.cpp b/src/buildparser.cpp
index 364aaa5..50fc0fc 100644
--- a/src/buildparser.cpp
+++ b/src/buildparser.cpp
@@ -283,7 +283,7 @@ void BuildParser::addPerformParam( const char *sParam )
283// 283//
284void BuildParser::addAction() 284void BuildParser::addAction()
285{ 285{
286 lActions.push_back( ActionTmp("", ActionTmpCmdList()) ); 286 lActions.push_back( ActionTmp("", ActionTmpCmdList() ) );
287} 287}
288 288
289void BuildParser::addAction( const char *sName ) 289void BuildParser::addAction( const char *sName )
@@ -296,6 +296,11 @@ void BuildParser::addCommand( int nType )
296 lActions.back().second.push_back( ActionTmpCmd( nType, lTmp ) ); 296 lActions.back().second.push_back( ActionTmpCmd( nType, lTmp ) );
297} 297}
298 298
299void BuildParser::addGrpCommand( const char *sGroup, int nType )
300{
301 lActions.back().second.push_back( ActionTmpCmd( nType, sGroup ) );
302}
303
299// 304//
300// Global variable functions 305// Global variable functions
301// 306//
@@ -324,8 +329,15 @@ void BuildParser::debugDump()
324 for( ActionTmpCmdList::iterator j = (*i).second.begin(); 329 for( ActionTmpCmdList::iterator j = (*i).second.begin();
325 j != (*i).second.end(); j++ ) 330 j != (*i).second.end(); j++ )
326 { 331 {
327 printf(" %d ", (*j).first ); 332 printf(" %d ", (*j).nAct );
328 printBuildList( (*j).second ); 333 if( (*j).bGroup )
334 {
335 printf("!%s", (*j).sGroup.c_str() );
336 }
337 else
338 {
339 printBuildList( (*j).lCmds );
340 }
329 printf("\n"); 341 printf("\n");
330 } 342 }
331 } 343 }
@@ -555,14 +567,23 @@ Build *BuildParser::genBuild()
555 for( ActionTmpCmdList::iterator j = (*i).second.begin(); 567 for( ActionTmpCmdList::iterator j = (*i).second.begin();
556 j != (*i).second.end(); j++ ) 568 j != (*i).second.end(); j++ )
557 { 569 {
558 StringList lWhat = buildToStringList( 570 if( (*j).bGroup )
559 (*j).second, StringList(), bld 571 {
560 ); 572 pAct->addCommand(
561 573 (Action::eAction)((*j).nAct), (*j).sGroup, true
562 for( StringList::iterator k = lWhat.begin(); 574 );
563 k != lWhat.end(); k++ ) 575 }
576 else
564 { 577 {
565 pAct->addCommand( (Action::eAction)((*j).first), *k ); 578 StringList lWhat = buildToStringList(
579 (*j).lCmds, StringList(), bld
580 );
581
582 for( StringList::iterator k = lWhat.begin();
583 k != lWhat.end(); k++ )
584 {
585 pAct->addCommand( (Action::eAction)((*j).nAct), *k, false );
586 }
566 } 587 }
567 } 588 }
568 589