X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fpackage.cpp;h=f74b4a09bdda43e905df82ff8584009b2da0b9db;hb=f2b26f1929a8209a746bcf4944165b0ba9ef303f;hp=20fec32acfb84d64665ff2c05372482761de3eb2;hpb=c679a9dd1a97ae3b1ffa568143d42d02c2ca9e74;p=builder.git diff --git a/source/package.cpp b/source/package.cpp index 20fec32..f74b4a0 100644 --- a/source/package.cpp +++ b/source/package.cpp @@ -1,10 +1,4 @@ -/* $Id$ - -This file is part of builder -Copyright © 2006-2007 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - +#include #include #include #include "builder.h" @@ -14,29 +8,21 @@ Distributed under the LGPL using namespace std; using namespace Msp; -#include - -/** -Creates a buildable package. -*/ Package::Package(Builder &b, const string &n): builder(b), name(n), conf_done(false), use_pkgconfig(true) -{ } +{ + builder.get_package_manager().add_package(this); +} -/** -Processes configuration options that were most likely obtained from the command -line. -*/ void Package::configure(const StringMap &opts, unsigned flag) { if(conf_done) return; - if(builder.get_verbose()>=3) - cout<<"Configuring "<(p) { add("require", &Loader::require); } void Package::Loader::require(const string &n) { - Package *req=pkg.builder.get_package(n); + Package *req = obj.builder.get_package_manager().find_package(n); if(req) - pkg.requires.push_back(req); + obj.requires.push_back(req); }