]> git.tdb.fi Git - builder.git/blobdiff - source/package.cpp
Replace per-file copyright notices with a single file
[builder.git] / source / package.cpp
index 20fec32acfb84d64665ff2c05372482761de3eb2..c4710bca79a4f6082b7dd3e7b62297e85a247599 100644 (file)
@@ -1,10 +1,4 @@
-/* $Id$
-
-This file is part of builder
-Copyright © 2006-2007 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 +8,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 +15,13 @@ Package::Package(Builder &b, const string &n):
        use_pkgconfig(true)
 { }
 
-/**
-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);
 
@@ -48,10 +33,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)
@@ -61,7 +45,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);
 }