add("use", &Loader::use);
}
+void Component::Loader::build_info()
+{
+ load_sub(obj.build_info);
+}
+
void Component::Loader::if_arch(const string &cond)
{
bool match = obj.package.get_builder().get_current_arch().match_name(cond);
load_sub_with(*this);
}
-void Component::Loader::source(const string &s)
+void Component::Loader::install_map()
{
- obj.sources.push_back((obj.package.get_source_directory()/s).str());
+ load_sub(obj.install_map, obj.package.get_source_directory());
}
void Component::Loader::require(const string &n)
obj.requires.push_back(req);
}
-void Component::Loader::build_info()
-{
- load_sub(obj.build_info);
-}
-
-void Component::Loader::install_map()
+void Component::Loader::source(const string &s)
{
- load_sub(obj.install_map, obj.package.get_source_directory());
+ obj.sources.push_back((obj.package.get_source_directory()/s).str());
}
void Component::Loader::use(const string &n)
public:
Loader(Component &);
private:
+ void build_info();
void if_arch(const std::string &);
void if_feature(const std::string &);
- void source(const std::string &);
- void require(const std::string &);
- void build_info();
void install_map();
+ void require(const std::string &);
+ void source(const std::string &);
void use(const std::string &);
};
public:
virtual ~Package() { }
- const std::string &get_name() const { return name; }
Builder &get_builder() const { return builder; }
+ const std::string &get_name() const { return name; }
const Requirements &get_required_packages() const { return requires; }
const BuildInfo &get_exported_build_info() const { return export_binfo; }
source_tarball = &components.back();
}
-void SourcePackage::set_build_type(const BuildType &t)
-{
- build_type = &t;
-}
-
FS::Path SourcePackage::get_temp_directory() const
{
string subdir = builder.get_current_arch().get_name();
}
}
+void SourcePackage::set_build_type(const BuildType &t)
+{
+ build_type = &t;
+}
+
void SourcePackage::do_prepare()
{
BuildInfo final_build_info;
const std::string &get_version() const { return version; }
const std::string &get_interface_version() const { return interface_version; }
const std::string &get_description() const { return description; }
+
FileTarget &get_build_file() const { return *build_file; }
const Msp::FS::Path &get_source_directory() const { return source_dir; }
Msp::FS::Path get_temp_directory() const;
Msp::FS::Path get_output_directory() const;
+
const ComponentList &get_components() const { return components; }
const Config &get_config() const { return config; }
bool match_feature(const std::string &) const;
void set_build_type(const BuildType &);
const BuildInfo &get_build_info() const { return build_info; }
-
- Cache &get_cache() const { return cache; }
private:
virtual void do_prepare();
+public:
+ Cache &get_cache() const { return cache; }
+private:
virtual void save_caches();
};