]> git.tdb.fi Git - builder.git/blob - source/component.cpp
38f4d6b4279ccfc897ef6392565c4670857c51d7
[builder.git] / source / component.cpp
1 #include "component.h"
2 #include "package.h"
3
4 using namespace std;
5
6 Component::Component(Package &p, Type t, const string &n):
7         pkg(p),
8         type(t),
9         name(n)
10 { }
11
12 void Component::create_build_info()
13 {
14         build_info=pkg.get_build_info();
15         build_info.unique();
16 }
17
18 Component::Loader::Loader(Component &c):
19         comp(c)
20 {
21         add("source",          &Loader::source);
22         add("install",         &Component::install);
23         add("install_headers", &Component::install_headers);
24 }
25
26 void Component::Loader::source(const string &s)
27 {
28         comp.sources.push_back(comp.pkg.get_source()/s);
29 }