X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcomponent.cpp;h=e48e4f518477ff285d8b2878e8739d0f6b5147ca;hb=f4a10e1dc189f28367eafe3b91723d275928ced7;hp=04c9d17204dd8729cc2b56993bd9697041f480d5;hpb=8d7926359d2477a9928d7367678314bcbc1f6e81;p=builder.git diff --git a/source/component.cpp b/source/component.cpp index 04c9d17..e48e4f5 100644 --- a/source/component.cpp +++ b/source/component.cpp @@ -35,8 +35,6 @@ Component::Component(SourcePackage &p, Type t, const string &n): type(t), name(n), install(false), - module_host(0), - modular(false), deflt(true) { } @@ -101,18 +99,6 @@ void Component::create_build_info() build_info.cflags.push_back("-fPIC"); } - if(modular) - { - build_info.ldflags.push_back("-rdynamic"); - build_info.libs.push_back("dl"); - } - else if(module_host) - { - const StringList &host_src = module_host->get_sources(); - for(StringList::const_iterator i=host_src.begin(); i!=host_src.end(); ++i) - build_info.incpath.push_back(*i); - } - build_info.unique(); } @@ -309,24 +295,14 @@ void Component::Loader::require(const string &n) void Component::Loader::modular() { - if(comp.type!=PROGRAM) - throw Exception("Only programs can be modular"); - comp.modular = true; + IO::print("%s: Note: modular is deprecated\n", get_source()); + comp.build_info.ldflags.push_back("-rdynamic"); + comp.build_info.libs.push_back("dl"); } -void Component::Loader::host(const string &n) +void Component::Loader::host(const string &) { - const ComponentList &comps = comp.pkg.get_components(); - for(ComponentList::const_iterator i=comps.begin(); i!=comps.end(); ++i) - if(i->get_name()==n) - { - if(i->get_type()!=PROGRAM || !i->is_modular()) - throw Exception("Module host must be a modular program"); - comp.module_host = &*i; - return; - } - - throw KeyError("Unknown component", n); + IO::print("%s: Note: host is deprecated\n", get_source()); } void Component::Loader::install_headers(const string &p)