/* $Id$
This file is part of builder
-Copyright © 2006-2007 Mikko Rasa, Mikkosoft Productions
+Copyright © 2006-2007, 2009 Mikko Rasa, Mikkosoft Productions
Distributed under the LGPL
*/
#include <iostream>
-/**
-Creates a buildable package.
-*/
Package::Package(Builder &b, const string &n):
builder(b),
name(n),
use_pkgconfig(true)
{ }
-/**
-Processes configuration options that were most likely obtained from the command
-line.
-*/
+PackageList Package::collect_requires()
+{
+ PackageList result;
+ result.push_back(this);
+ for(PackageList::const_iterator i=requires.begin(); i!=requires.end(); ++i)
+ {
+ PackageList r=(*i)->collect_requires();
+ result.splice(result.end(), r);
+ }
+
+ result.sort();
+ result.unique();
+
+ return result;
+}
+
void Package::configure(const StringMap &opts, unsigned flag)
{
if(conf_done)
conf_done=true;
}
-/*** private ***/
Package::Loader::Loader(Package &p):
pkg(p)