X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fsourcefile.cpp;h=7425a0f132c893c0448d0954993c1bde0321262f;hb=1fdef3ec9d6291af8a467ea0e2c90e7f19141ae2;hp=0fc6d696c2394776a10b7692b381f1dabcc9c2ec;hpb=5006279d7b92e578ecfa8a04186f675c6b9f1eea;p=builder.git diff --git a/source/sourcefile.cpp b/source/sourcefile.cpp index 0fc6d69..7425a0f 100644 --- a/source/sourcefile.cpp +++ b/source/sourcefile.cpp @@ -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; } }