aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build.conf2
-rw-r--r--src/targetfile.cpp20
2 files changed, 20 insertions, 2 deletions
diff --git a/build.conf b/build.conf
index 43f176d..18e4eec 100644
--- a/build.conf
+++ b/build.conf
@@ -1,7 +1,7 @@
1# build.conf for build, kind of whacky, eh? 1# build.conf for build, kind of whacky, eh?
2 2
3default action: check targets() 3default action: check targets()
4"clean" action: clean "build" 4"clean" action: clean targets()
5"rebuild" action: clean "build", check "build" 5"rebuild" action: clean "build", check "build"
6 6
7set "CXXFLAGS" += "-ggdb -Ilibbu++/src" 7set "CXXFLAGS" += "-ggdb -Ilibbu++/src"
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 )