From ff938b977db21378a1f016f65e7345c50e71ef8f Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 24 Apr 2007 14:09:50 +0000 Subject: 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.) --- src/build.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'src/build.cpp') 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() } printf("\n"); } + + printf("Groups:\n"); + for( GroupMap::iterator i = mGroup.begin(); i != mGroup.end(); i++ ) + { + printf(" %s: ", (*i).first.c_str() ); + for( TargetList::iterator j = (*i).second.begin(); + j != (*i).second.end(); j++ ) + { + if( j != (*i).second.begin() ) printf(", "); + printf("%s", (*j)->getName().c_str() ); + } + printf("\n"); + } } RuleList Build::findChainRules( Rule *pHead ) @@ -387,3 +400,13 @@ void Build::setMode( Action::eAction nAct ) } } +void Build::addToGroup( const std::string &sGroup, Target *pTarget ) +{ + if( mGroup.find( sGroup ) == mGroup.end() ) + { + mGroup[sGroup] = TargetList(); + } + + mGroup[sGroup].push_back( pTarget ); +} + -- cgit v1.2.3