]> git.tdb.fi Git - builder.git/blobdiff - source/builder.cpp
Pass the full path to the Build file to SourcePackage and create a target for it
[builder.git] / source / builder.cpp
index 6c508026c6e7a67e6b32198609e3a5c112d21d9b..1c90aa8e2229ac6192fcc9bff7c92b7c59417e2a 100644 (file)
@@ -365,7 +365,7 @@ int Builder::load_build_file(const FS::Path &fn)
        logger.log("files", format("Reading %s", fn));
 
        DataFile::Parser parser(in, fn.str());
-       Loader loader(*this, fn.subpath(0, fn.size()-1));
+       Loader loader(*this);
        loader.load(parser);
 
        return 0;
@@ -579,9 +579,8 @@ string Builder::usagemsg;
 string Builder::helpmsg;
 
 
-Builder::Loader::Loader(Builder &b, const FS::Path &s):
-       DataFile::ObjectLoader<Builder>(b),
-       src(s)
+Builder::Loader::Loader(Builder &b):
+       DataFile::ObjectLoader<Builder>(b)
 {
        add("architecture", &Loader::architecture);
        add("binary_package", &Loader::binpkg);
@@ -618,7 +617,7 @@ void Builder::Loader::profile(const string &)
 
 void Builder::Loader::package(const string &n)
 {
-       SourcePackage *pkg = new SourcePackage(obj, n, src);
+       SourcePackage *pkg = new SourcePackage(obj, n, get_source());
        if(!obj.main_pkg)
                obj.main_pkg = pkg;