aboutsummaryrefslogtreecommitdiff
path: root/src/build.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2006-09-21 15:21:53 +0000
committerMike Buland <eichlan@xagasoft.com>2006-09-21 15:21:53 +0000
commitd5b78aeaa9af689b52046eb5577624fb6d031835 (patch)
tree43271fd845413fc1913e17e4799b9ccc4aa6002b /src/build.cpp
parent2b24eab3703bedb2aa4f1329fc3c919c869b6e85 (diff)
downloadbuild-d5b78aeaa9af689b52046eb5577624fb6d031835.tar.gz
build-d5b78aeaa9af689b52046eb5577624fb6d031835.tar.bz2
build-d5b78aeaa9af689b52046eb5577624fb6d031835.tar.xz
build-d5b78aeaa9af689b52046eb5577624fb6d031835.zip
Auto target chaining based on requirements is now in place. This means that if
a requirement is set for a target that needs to be built, and that requirement is another target, that target will be processed when it is needed.
Diffstat (limited to 'src/build.cpp')
-rw-r--r--src/build.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/build.cpp b/src/build.cpp
index c81c885..5121d1f 100644
--- a/src/build.cpp
+++ b/src/build.cpp
@@ -86,16 +86,8 @@ void Build::execAction( const std::string &sWhat )
86 ); 86 );
87 Target *pTarget = mTarget[pAct->getWhat()]; 87 Target *pTarget = mTarget[pAct->getWhat()];
88 pView->beginCommand( pAct->getAct(), pAct->getWhat() ); 88 pView->beginCommand( pAct->getAct(), pAct->getWhat() );
89 switch( pAct->getAct() ) 89 if( !pTarget->wasRun() )
90 { 90 pTarget->run( pAct->getAct(), *this );
91 case Action::actCheck:
92 pTarget->check( *this );
93 break;
94
95 case Action::actClean:
96 pTarget->clean( *this );
97 break;
98 }
99 pView->endCommand(); 91 pView->endCommand();
100 } 92 }
101 93
@@ -363,3 +355,12 @@ void Build::updateCache( const std::string &sID, FunctionList &lFunc, StringList
363 bCacheUpdated = true; 355 bCacheUpdated = true;
364} 356}
365 357
358void Build::chainTarget( const std::string &sName )
359{
360 TargetMap::iterator i = mTarget.find(sName);
361 if( i == mTarget.end() ) return;
362
363 if( !(*i).second->wasRun() )
364 (*i).second->run( Action::actCheck, *this );
365}
366