3 This file is part of builder
4 Copyright © 2006-2007 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
8 #include <msp/strings/lexicalcast.h>
9 #include <msp/strings/utils.h>
20 Creates a buildable package.
22 Package::Package(Builder &b, const string &n):
30 Tries to resolve all references to dependency packages.
32 void Package::resolve_refs()
34 for(PkgRefList::iterator i=requires.begin(); i!=requires.end(); ++i)
39 Processes configuration options that were most likely obtained from the command
42 void Package::configure(const StringMap &opts, unsigned flag)
47 if(builder.get_verbose()>=3)
48 cout<<"Configuring "<<name<<'\n';
50 do_configure(opts, flag);
52 for(PkgRefList::iterator i=requires.begin(); i!=requires.end(); ++i)
53 i->get_package()->configure(opts, flag&2);
62 Package::Loader::Loader(Package &p):
65 add("require", &Loader::require);
68 void Package::Loader::require(const string &n)
70 pkg.requires.push_back(PackageRef(pkg.builder, n));