aboutsummaryrefslogtreecommitdiff
path: root/src/build.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2007-04-24 14:09:50 +0000
committerMike Buland <eichlan@xagasoft.com>2007-04-24 14:09:50 +0000
commitff938b977db21378a1f016f65e7345c50e71ef8f (patch)
tree0f05b9b5b5ea13ce234cdd27e1eb8ccbccb2dc51 /src/build.cpp
parentbe41caa5ca6756c7809cabaf6d8bee321928c45a (diff)
downloadbuild-ff938b977db21378a1f016f65e7345c50e71ef8f.tar.gz
build-ff938b977db21378a1f016f65e7345c50e71ef8f.tar.bz2
build-ff938b977db21378a1f016f65e7345c50e71ef8f.tar.xz
build-ff938b977db21378a1f016f65e7345c50e71ef8f.zip
Half way there on the road to implementing basic group functionality. You can
create groups, you can't do anything with them yet (although the syntax is supported already.)
Diffstat (limited to '')
-rw-r--r--src/build.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/build.cpp b/src/build.cpp
index 889efa4..db14750 100644
--- a/src/build.cpp
+++ b/src/build.cpp
@@ -289,6 +289,19 @@ void Build::debugDump()
289 } 289 }
290 printf("\n"); 290 printf("\n");
291 } 291 }
292
293 printf("Groups:\n");
294 for( GroupMap::iterator i = mGroup.begin(); i != mGroup.end(); i++ )
295 {
296 printf(" %s: ", (*i).first.c_str() );
297 for( TargetList::iterator j = (*i).second.begin();
298 j != (*i).second.end(); j++ )
299 {
300 if( j != (*i).second.begin() ) printf(", ");
301 printf("%s", (*j)->getName().c_str() );
302 }
303 printf("\n");
304 }
292} 305}
293 306
294RuleList Build::findChainRules( Rule *pHead ) 307RuleList Build::findChainRules( Rule *pHead )
@@ -387,3 +400,13 @@ void Build::setMode( Action::eAction nAct )
387 } 400 }
388} 401}
389 402
403void Build::addToGroup( const std::string &sGroup, Target *pTarget )
404{
405 if( mGroup.find( sGroup ) == mGroup.end() )
406 {
407 mGroup[sGroup] = TargetList();
408 }
409
410 mGroup[sGroup].push_back( pTarget );
411}
412