X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ffiletarget.cpp;h=9908c0d4d2836c36c5e05e1eda9aa221bab067b2;hb=5881b8499dc159564d2f69c3b037e16b4d1af4db;hp=adbb058dc3d192483bbfa7c03f9d042f1e8dcfdb;hpb=968db78efd29b1f4890068693728299b2c7c92c7;p=builder.git diff --git a/source/filetarget.cpp b/source/filetarget.cpp index adbb058..9908c0d 100644 --- a/source/filetarget.cpp +++ b/source/filetarget.cpp @@ -82,3 +82,11 @@ void FileTarget::check_rebuild() if(!needs_rebuild() && package && package->get_config().get_mtime()>mtime) mark_rebuild("Package options changed"); } + +Task *FileTarget::build() +{ + if(tool && !builder.get_dry_run() && mtime) + FS::unlink(path); + + return Target::build(); +}