X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcomponent.cpp;h=1fd6b24bfc89676324cd80eb7fe3469c6263b86a;hb=b1a6e6dcdd7e0da272ab0ebbed4e295f83f1165a;hp=bab7ba1e264a3e80e6ebfba74133e2c3fd7a843f;hpb=4dc31cca056ea293d320928f61fef0558089d32d;p=builder.git diff --git a/source/component.cpp b/source/component.cpp index bab7ba1..1fd6b24 100644 --- a/source/component.cpp +++ b/source/component.cpp @@ -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("cflag", &Loader::cflag); } 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::cflag(const string &f) +{ + comp.build_info.cflags.push_back(f); }