]> git.tdb.fi Git - builder.git/blobdiff - source/package.cpp
Style update: add spaces around assignment operators
[builder.git] / source / package.cpp
index c905ee464e7041de6372cbcca0f7e7142e20ef35..f1374298eac0c8d14315a03d751498d5ba144a97 100644 (file)
@@ -1,10 +1,11 @@
 /* $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 <msp/io/print.h>
 #include <msp/strings/lexicalcast.h>
 #include <msp/strings/utils.h>
 #include "builder.h"
@@ -14,11 +15,6 @@ Distributed under the LGPL
 using namespace std;
 using namespace Msp;
 
-#include <iostream>
-
-/**
-Creates a buildable package.
-*/
 Package::Package(Builder &b, const string &n):
        builder(b),
        name(n),
@@ -26,17 +22,13 @@ Package::Package(Builder &b, const string &n):
        use_pkgconfig(true)
 { }
 
-/**
-Collects all directly and indirectly required packages, including the package
-itself.
-*/
 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();
+               PackageList r = (*i)->collect_requires();
                result.splice(result.end(), r);
        }
 
@@ -46,17 +38,13 @@ PackageList Package::collect_requires()
        return result;
 }
 
-/**
-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 "<<name<<'\n';
+               IO::print("Configuring %s\n", name);
 
        do_configure(opts, flag);
 
@@ -68,10 +56,9 @@ void Package::configure(const StringMap &opts, unsigned flag)
 
        create_build_info();
 
-       conf_done=true;
+       conf_done = true;
 }
 
-/*** private ***/
 
 Package::Loader::Loader(Package &p):
        pkg(p)
@@ -81,7 +68,7 @@ Package::Loader::Loader(Package &p):
 
 void Package::Loader::require(const string &n)
 {
-       Package *req=pkg.builder.get_package(n);
+       Package *req = pkg.builder.get_package(n);
        if(req)
                pkg.requires.push_back(req);
 }