]> git.tdb.fi Git - builder.git/blobdiff - source/sourcefile.cpp
Add install component type
[builder.git] / source / sourcefile.cpp
index 0fc6d696c2394776a10b7692b381f1dabcc9c2ec..7425a0f132c893c0448d0954993c1bde0321262f 100644 (file)
@@ -17,15 +17,23 @@ Distributed under the LGPL
 using namespace std;
 using namespace Msp;
 
-SourceFile::SourceFile(Builder &b, const Component *c, const FS::Path &p):
-       FileTarget(b, (c ? &c->get_package() : 0), p),
-       comp(c)
+SourceFile::SourceFile(Builder &b, const FS::Path &p):
+       FileTarget(b, 0, p),
+       comp(0)
+{ }
+
+SourceFile::SourceFile(Builder &b, const Component &c, const FS::Path &p):
+       FileTarget(b, &c.get_package(), p),
+       comp(&c)
 { }
 
 void SourceFile::find_depends()
 {
        if(!comp)
+       {
+               deps_ready=true;
                return;
+       }
 
        const SourcePackage &spkg=comp->get_package();
        string relname=FS::relative(name, spkg.get_source()).str();
@@ -62,6 +70,7 @@ void SourceFile::find_depends()
                }
                catch(const IO::FileNotFound &)
                {
+                       // XXX WTF?
                        return;
                }
        }