X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fsourcepackage.cpp;h=9e1b68dd43d60b4b81d61f2c65051412d7286fa6;hb=74ea8208bb1aa1d9afc9657a4cdfac6714241887;hp=9738146423de46bc9152b7bdfac60f6734a8b639;hpb=11b4732f81396aa3d8b0fc8928b8e1981032e743;p=builder.git diff --git a/source/sourcepackage.cpp b/source/sourcepackage.cpp index 9738146..9e1b68d 100644 --- a/source/sourcepackage.cpp +++ b/source/sourcepackage.cpp @@ -5,9 +5,9 @@ #include #include #include +#include "androidapplicationcomponent.h" #include "binarycomponent.h" #include "binarypackage.h" -#include "booleanevaluator.h" #include "builder.h" #include "datapackcomponent.h" #include "file.h" @@ -144,13 +144,15 @@ void SourcePackage::save_caches() SourcePackage::Loader::Loader(SourcePackage &p): - DataFile::DerivedObjectLoader(p) + DataFile::DerivedObjectLoader(p), + FeatureConditional(p, p.name) { init(0); } SourcePackage::Loader::Loader(SourcePackage &p, const Config::InputOptions &o): - DataFile::DerivedObjectLoader(p) + DataFile::DerivedObjectLoader(p), + FeatureConditional(p, p.name) { init(&o); } @@ -158,17 +160,17 @@ SourcePackage::Loader::Loader(SourcePackage &p, const Config::InputOptions &o): void SourcePackage::Loader::init(const Config::InputOptions *o) { options = o; - add("description", &SourcePackage::description); + add("android_application", &Loader::component); add("build_info", &Loader::build_info); + add("datapack", &Loader::component); + add("description", &SourcePackage::description); add("feature", &Loader::feature); add("generate", &Loader::generate); - add("if_feature", &Loader::if_feature); - add("program", &Loader::component_arg); - add("library", &Loader::component_arg); - add("module", &Loader::component_arg); add("install", &Loader::component); add("interface_version", &Loader::interface_version); - add("datapack", &Loader::component); + add("library", &Loader::component_arg); + add("module", &Loader::component_arg); + add("program", &Loader::component_arg); add("source_archive", &Loader::source_archive); add("source_tarball", &Loader::source_archive); add("tarball", &Loader::tarball); @@ -228,15 +230,6 @@ void SourcePackage::Loader::generate(const string &tag) obj.local_tools.add_tool(gen); } -void SourcePackage::Loader::if_feature(const string &cond) -{ - BooleanEvaluator eval(sigc::mem_fun(&obj, &SourcePackage::match_feature)); - bool match = eval.evaluate(cond); - obj.builder.get_logger().log("configure", format("%s: feature %s %smatched", obj.name, cond, (match ? "" : "not "))); - if(match) - load_sub_with(*this); -} - void SourcePackage::Loader::interface_version(const string &v) { obj.interface_version = v;