]> git.tdb.fi Git - builder.git/blobdiff - source/component.cpp
Support custom build info
[builder.git] / source / component.cpp
index bab7ba1e264a3e80e6ebfba74133e2c3fd7a843f..e0630e6cf8a69547ecb27f6c845f5daa6857f041 100644 (file)
@@ -6,18 +6,31 @@ using namespace std;
 Component::Component(Package &p, Type t, const string &n):
        pkg(p),
        type(t),
-       name(n)
+       name(n),
+       install(false)
 { }
 
+void Component::create_build_info()
+{
+       build_info.add(pkg.get_build_info());
+       build_info.unique();
+}
+
 Component::Loader::Loader(Component &c):
        comp(c)
 {
        add("source",          &Loader::source);
        add("install",         &Component::install);
        add("install_headers", &Component::install_headers);
+       add("build_info",      &Loader::build_info);
 }
 
 void Component::Loader::source(const string &s)
 {
-       comp.source=comp.pkg.get_source()/s;
+       comp.sources.push_back(comp.pkg.get_source()/s);
+}
+
+void Component::Loader::build_info()
+{
+       load_sub(comp.build_info);
 }