]> git.tdb.fi Git - builder.git/blobdiff - source/filetarget.cpp
Do dependency discovery in a single pass
[builder.git] / source / filetarget.cpp
index decb4bf793d68015066e1dede84f044e340ae836..dd20a0e8554d8cb5795af04e1e09b33fa279c2cb 100644 (file)
@@ -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, generate_name(p, a)),
        path(a),
        size(0)
 {
+       package = p;
+
        builder.get_vfs().register_path(path, this);
 
        if(FS::Stat st = FS::lstat(path))
@@ -60,7 +62,7 @@ void FileTarget::check_rebuild()
                mark_rebuild("Package options changed");
 }
 
-string FileTarget::make_name(const Package *pkg, const FS::Path &pth)
+string FileTarget::generate_name(const Package *pkg, const FS::Path &pth)
 {
        if(const SourcePackage *spkg = dynamic_cast<const SourcePackage *>(pkg))
        {