X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fpackage.cpp;h=05bebcc55f929971cb5d1780ba98200b6730bcca;hb=50baabc242633d531d3f9542e9a64491b6e12c6c;hp=44444add8b04acb641d97fcccff567b4c74dae87;hpb=592fa2bca4e973678cbdc86802fe1c151b40e04d;p=builder.git diff --git a/source/package.cpp b/source/package.cpp index 44444ad..05bebcc 100644 --- a/source/package.cpp +++ b/source/package.cpp @@ -2,7 +2,6 @@ #include #include #include "builder.h" -#include "misc.h" #include "package.h" using namespace std; @@ -22,7 +21,7 @@ void Package::prepare() if(prepared) return; - for(PackageList::const_iterator i=requires.begin(); i!=requires.end(); ++i) + for(Requirements::const_iterator i=requires.begin(); i!=requires.end(); ++i) (*i)->prepare(); do_prepare(); @@ -39,9 +38,7 @@ Package::Loader::Loader(Package &p): void Package::Loader::if_arch(const string &cond) { - const Architecture &arch = obj.builder.get_current_arch(); - bool negate = (cond[0]=='!'); - bool match = (arch.match_name(cond.substr(negate))!=negate); + bool match = obj.builder.get_current_arch().match_name(cond); obj.builder.get_logger().log("configure", format("%s: arch %s %smatched", obj.name, cond, (match ? "" : "not "))); if(match) load_sub_with(*this);