From 6aedf75408f0a8fa50edf9457b00f413227ec2d8 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Thu, 21 Sep 2006 15:47:56 +0000 Subject: Added two command line parameters, -i or --info will list available actions, maybe more later. -c or --clean will set all of the commands in the current action to clean, so now you don't have to create clean rules. Also, every viewer should now support stacks of targets, they don't now, and it can look a little funny. --- src/build.cpp | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) (limited to 'src/build.cpp') diff --git a/src/build.cpp b/src/build.cpp index 5121d1f..889efa4 100644 --- a/src/build.cpp +++ b/src/build.cpp @@ -85,10 +85,10 @@ void Build::execAction( const std::string &sWhat ) sWhat.c_str() ); Target *pTarget = mTarget[pAct->getWhat()]; - pView->beginCommand( pAct->getAct(), pAct->getWhat() ); + //pView->beginCommand( pAct->getAct(), pAct->getWhat() ); if( !pTarget->wasRun() ) pTarget->run( pAct->getAct(), *this ); - pView->endCommand(); + //pView->endCommand(); } pView->endAction(); @@ -364,3 +364,26 @@ void Build::chainTarget( const std::string &sName ) (*i).second->run( Action::actCheck, *this ); } +void Build::printInfo() +{ + printf("---- Build Info ----\n"); + printf("Valid actions: "); + for( ActionMap::iterator i = mAction.begin(); i != mAction.end(); i++ ) + { + if( i != mAction.begin() ) printf(", "); + if( (*i).first == "" ) + printf("*default*"); + else + printf("%s", (*i).first.c_str() ); + } + printf("\n\n"); +} + +void Build::setMode( Action::eAction nAct ) +{ + for( ActionMap::iterator i = mAction.begin(); i != mAction.end(); i++ ) + { + (*i).second->setMode( nAct ); + } +} + -- cgit v1.2.3