]> git.tdb.fi Git - builder.git/blobdiff - source/filetarget.cpp
Make tools capable of reporting a system-wide path used to locate input files
[builder.git] / source / filetarget.cpp
index decb4bf793d68015066e1dede84f044e340ae836..62265b0d9c956bbdaf644192f0a5f428ecb483ee 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))
@@ -46,12 +48,6 @@ void FileTarget::check_rebuild()
                                mark_rebuild((*i)->get_name()+" has changed");
                        else if((*i)->needs_rebuild())
                                mark_rebuild((*i)->get_name()+" needs rebuilding");
-                       else
-                       {
-                               Target *real = ft->get_real_target();
-                               if(real->needs_rebuild())
-                                       mark_rebuild(real->get_name()+" needs rebuilding");
-                       }
                }
        }
 
@@ -60,7 +56,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))
        {