aboutsummaryrefslogtreecommitdiff
path: root/src/targetfile.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2006-09-12 19:33:43 +0000
committerMike Buland <eichlan@xagasoft.com>2006-09-12 19:33:43 +0000
commit1dc59875ed1e072a0c87b10e1bb43d7be2311ec8 (patch)
treedabee4f6c64856b176b9f398fc578148697c512e /src/targetfile.cpp
parent249d3a1b6bd6a602605013ac1bca2b92c7a361c9 (diff)
downloadbuild-1dc59875ed1e072a0c87b10e1bb43d7be2311ec8.tar.gz
build-1dc59875ed1e072a0c87b10e1bb43d7be2311ec8.tar.bz2
build-1dc59875ed1e072a0c87b10e1bb43d7be2311ec8.tar.xz
build-1dc59875ed1e072a0c87b10e1bb43d7be2311ec8.zip
clean now works, the -c option will come later.
Diffstat (limited to '')
-rw-r--r--src/targetfile.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/targetfile.cpp b/src/targetfile.cpp
index ddb1c18..3743297 100644
--- a/src/targetfile.cpp
+++ b/src/targetfile.cpp
@@ -61,7 +61,25 @@ void TargetFile::check( Build &bld )
61 61
62void TargetFile::clean( Build &bld ) 62void TargetFile::clean( Build &bld )
63{ 63{
64 printf("Target file cleaning: %s\n", getName().c_str() ); 64 Rule *pRule = bld.getRule( getRule() );
65 PerformList lPerf;
66 pRule->setTarget( getName() );
67 StringList lFinal = pRule->execute( bld, getInput(), lPerf );
68
69 bld.getView()->beginPerforms( lPerf.size() );
70
71 for( PerformList::iterator i = lPerf.begin(); i != lPerf.end(); i++ )
72 {
73 if( access( (*i)->getTarget().c_str(), W_OK ) == 0 )
74 {
75 bld.getView()->beginPerform( *i );
76 unlink( (*i)->getTarget().c_str() );
77 bld.getView()->endPerform();
78 }
79
80 }
81
82 bld.getView()->endPerforms();
65} 83}
66 84
67time_t TargetFile::getTime( Build &bld, std::string str ) 85time_t TargetFile::getTime( Build &bld, std::string str )