X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fpackage.cpp;h=8fb2b4dde4ffe8dda0e0b2507aca1174ca7ee968;hb=8bc8db44c47cd2906c57dccbfb589e41eff7f694;hp=49866a71d2442f8aff3fd902c12d52c31aa98554;hpb=445edbc3c42bbd7880cc414cf153ddfd196bfc1c;p=builder.git diff --git a/source/package.cpp b/source/package.cpp index 49866a7..8fb2b4d 100644 --- a/source/package.cpp +++ b/source/package.cpp @@ -1,3 +1,10 @@ +/* $Id$ + +This file is part of builder +Copyright © 2006-2007 Mikko Rasa, Mikkosoft Productions +Distributed under the LGPL +*/ + #include #include #include "builder.h" @@ -19,9 +26,12 @@ Package::Package(Builder &b, const string &n, const Path::Path &s): source(s), config(*this), conf_done(false), + deps_cache(*this), use_pkgconfig(true), need_path(false) { + tar_files.push_back(source/"Build"); + if(builder.get_verbose()>=4) cout<<"Created buildable package "<set_path(config.get_option((*i)->get_name()+"_path").value); (*i)->configure(opts, flag&2); } + + deps_cache.load(); } create_build_info(); @@ -216,7 +228,8 @@ Package::Package(Builder &b, const string &n, const vector &info): name(n), buildable(false), config(*this), - conf_done(false) + conf_done(false), + deps_cache(*this) { for(vector::const_iterator i=info.begin(); i!=info.end(); ++i) { @@ -349,6 +362,7 @@ void Package::create_build_info() export_binfo.unique(); } + Package::Loader::Loader(Package &p): pkg(p) { @@ -362,6 +376,7 @@ Package::Loader::Loader(Package &p): add("module", &Loader::module); add("headers", &Loader::headers); add("build_info", &Loader::build_info); + add("tar_file", &Loader::tar_file); } void Package::Loader::require(const string &n) @@ -413,3 +428,8 @@ void Package::Loader::build_info() { load_sub(pkg.build_info); } + +void Package::Loader::tar_file(const string &f) +{ + pkg.tar_files.push_back(pkg.source/f); +}