]> git.tdb.fi Git - builder.git/blobdiff - source/sourcepackage.cpp
Check headers as well
[builder.git] / source / sourcepackage.cpp
index e74c0b7540c409fd07e0ed3048dd7ee167da3be4..77440d6057112bf013a41c1b221ff7b924a6372c 100644 (file)
@@ -68,7 +68,7 @@ FS::Path SourcePackage::get_out_dir() const
                return source_dir/arch.get_name();
 }
 
-void SourcePackage::create_build_info()
+void SourcePackage::do_prepare()
 {
        BuildInfo final_build_info;
 
@@ -103,10 +103,7 @@ void SourcePackage::create_build_info()
                export_binfo.incpath.push_back((builder.get_prefix()/"include").str());
                export_binfo.libpath.push_back((builder.get_prefix()/"lib").str());
        }
-}
 
-void SourcePackage::create_targets()
-{
        cache.load();
 
        bool pc_needed = false;
@@ -151,7 +148,6 @@ void SourcePackage::Loader::init(const Config::InputOptions *o)
        add("build_info",  &Loader::build_info);
        add("feature",     &Loader::feature);
        add("if",          &Loader::condition);
-       add("if_arch",     &Loader::if_arch);
        add("if_feat",     &Loader::if_feature);
        add("program",     &Loader::component<Component::PROGRAM>);
        add("library",     &Loader::component<Component::LIBRARY>);
@@ -232,16 +228,6 @@ void SourcePackage::Loader::headers(const string &n)
                install_map[*i] = "include/"+comp.get_name();
 }
 
-void SourcePackage::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);
-       obj.builder.get_logger().log("configure", format("%s: arch %s %smatched", obj.name, cond, (match ? "" : "not ")));
-       if(match)
-               load_sub_with(*this);
-}
-
 void SourcePackage::Loader::if_feature(const string &cond)
 {
        bool match = false;