X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcomponent.cpp;h=c2f4386a917b28a242868b53071b3084e3d00646;hb=f8655608bfdaf8634ad7cc566598a0db3fe557fe;hp=d23e1b3d1cc34825250b44b81570094514c69682;hpb=6140518acb736f9020005245686bfbc5fca2d329;p=builder.git diff --git a/source/component.cpp b/source/component.cpp index d23e1b3..c2f4386 100644 --- a/source/component.cpp +++ b/source/component.cpp @@ -4,6 +4,7 @@ #include #include #include +#include "booleanevaluator.h" #include "builder.h" #include "component.h" #include "csourcefile.h" @@ -339,7 +340,8 @@ void Component::Loader::build_info() void Component::Loader::if_arch(const string &cond) { - bool match = obj.package.get_builder().get_current_arch().match_name(cond); + BooleanEvaluator eval(sigc::hide<1>(sigc::mem_fun(&obj.package.get_builder().get_current_arch(), &Architecture::match_name)), false); + bool match = eval.evaluate(cond); obj.package.get_builder().get_logger().log("configure", format("%s/%s: arch %s %smatched", obj.package.get_name(), obj.name, cond, (match ? "" : "not "))); if(match) @@ -348,7 +350,8 @@ void Component::Loader::if_arch(const string &cond) void Component::Loader::if_feature(const string &cond) { - bool match = obj.package.match_feature(cond); + BooleanEvaluator eval(sigc::mem_fun(&obj.package, &SourcePackage::match_feature)); + bool match = eval.evaluate(cond); obj.package.get_builder().get_logger().log("configure", format("%s/%s: feature %s %smatched", obj.package.get_name(), obj.name, cond, (match ? "" : "not "))); if(match)