X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ffiletarget.cpp;h=2a60c2986bac2ec89f1454995f89283fe5d973da;hb=dc4b917034c9d3718f07139e2f0f3631a080c6f3;hp=f04e3101281d4a8f9cb10791503591c3a7caf0cb;hpb=4f5571c3098953378253234b476a5a2b07974065;p=builder.git diff --git a/source/filetarget.cpp b/source/filetarget.cpp index f04e310..2a60c29 100644 --- a/source/filetarget.cpp +++ b/source/filetarget.cpp @@ -10,10 +10,12 @@ using namespace std; using namespace Msp; FileTarget::FileTarget(Builder &b, const Package *p, const FS::Path &a): - Target(b, p, make_name(p, a)), + Target(b, make_name(p, a)), path(a), size(0) { + package = p; + builder.get_vfs().register_path(path, this); if(FS::Stat st = FS::lstat(path)) @@ -39,7 +41,7 @@ void FileTarget::check_rebuild() mark_rebuild("Does not exist"); else { - for(Dependencies::iterator i=depends.begin(); (i!=depends.end() && !rebuild); ++i) + for(Dependencies::iterator i=depends.begin(); (i!=depends.end() && !needs_rebuild()); ++i) { FileTarget *ft = dynamic_cast(*i); if(ft && ft->get_mtime()>mtime) @@ -56,7 +58,7 @@ void FileTarget::check_rebuild() } const SourcePackage *spkg = dynamic_cast(package); - if(!rebuild && spkg && spkg->get_config().get_mtime()>mtime) + if(!needs_rebuild() && spkg && spkg->get_config().get_mtime()>mtime) mark_rebuild("Package options changed"); }