aboutsummaryrefslogtreecommitdiff
path: root/src/build.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/build.cpp')
-rw-r--r--src/build.cpp41
1 files changed, 30 insertions, 11 deletions
diff --git a/src/build.cpp b/src/build.cpp
index db14750..a7421de 100644
--- a/src/build.cpp
+++ b/src/build.cpp
@@ -78,17 +78,36 @@ void Build::execAction( const std::string &sWhat )
78 78
79 for( pAct->begin(); !pAct->isEnded(); pAct->next() ) 79 for( pAct->begin(); !pAct->isEnded(); pAct->next() )
80 { 80 {
81 if( mTarget.find( pAct->getWhat() ) == mTarget.end() ) 81 if( pAct->isGroup() )
82 throw BuildException( 82 {
83 "No target matches %s in action %s.", 83 if( mGroup.find( pAct->getWhat() ) == mGroup.end() )
84 pAct->getWhat().c_str(), 84 throw BuildException(
85 sWhat.c_str() 85 "No group matches %s in action %s.",
86 ); 86 pAct->getWhat().c_str(),
87 Target *pTarget = mTarget[pAct->getWhat()]; 87 sWhat.c_str()
88 //pView->beginCommand( pAct->getAct(), pAct->getWhat() ); 88 );
89 if( !pTarget->wasRun() ) 89 TargetList &sl = mGroup[pAct->getWhat()];
90 pTarget->run( pAct->getAct(), *this ); 90 for( TargetList::iterator i = sl.begin(); i != sl.end(); i++ )
91 //pView->endCommand(); 91 {
92 Target *pTarget = *i;
93 if( !pTarget->wasRun() )
94 pTarget->run( pAct->getAct(), *this );
95 }
96 }
97 else
98 {
99 if( mTarget.find( pAct->getWhat() ) == mTarget.end() )
100 throw BuildException(
101 "No target matches %s in action %s.",
102 pAct->getWhat().c_str(),
103 sWhat.c_str()
104 );
105 Target *pTarget = mTarget[pAct->getWhat()];
106 //pView->beginCommand( pAct->getAct(), pAct->getWhat() );
107 if( !pTarget->wasRun() )
108 pTarget->run( pAct->getAct(), *this );
109 //pView->endCommand();
110 }
92 } 111 }
93 112
94 pView->endAction(); 113 pView->endAction();