X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fsourcefile.cpp;h=cadd1330e0bc94b2816e6b26268b5d0a195e5efb;hb=66d1078c04849ec17a7343d0494d6ed087e04318;hp=6c2cb760d763a8d8f949b40526b67c1cb88036f9;hpb=242c55b17e6608b29a77ca17a5b677e202a3ca90;p=builder.git diff --git a/source/sourcefile.cpp b/source/sourcefile.cpp index 6c2cb76..cadd133 100644 --- a/source/sourcefile.cpp +++ b/source/sourcefile.cpp @@ -17,8 +17,8 @@ Distributed under the LGPL using namespace std; using namespace Msp; -SourceFile::SourceFile(Builder &b, const Component *c, const string &n): - Target(b, c?&c->get_package():0, n), +SourceFile::SourceFile(Builder &b, const Component *c, const FS::Path &p): + FileTarget(b, (c ? &c->get_package() : 0), p), comp(c) { } @@ -68,7 +68,7 @@ void SourceFile::find_depends() const StringList &incpath=comp->get_build_info().incpath; - string path=name.substr(0, name.rfind('/')); + FS::Path dir=FS::dirname(path); for(list::iterator i=includes.begin(); i!=includes.end(); ++i) { Target *hdr=builder.get_header(*i, path, incpath);