aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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 )