X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcomponent.cpp;h=5f50a6525b349eb921a04648cfd7bc44ad224384;hb=71554f76b7ae8f1f9d183dc0c522655ce458cb78;hp=371e145a0369ab7f3a37a48131033d8446e567af;hpb=07503a34b80778fe74977f0fb0c2094c92d64ce0;p=builder.git diff --git a/source/component.cpp b/source/component.cpp index 371e145..5f50a65 100644 --- a/source/component.cpp +++ b/source/component.cpp @@ -59,15 +59,14 @@ void Component::create_build_info() } final_build_info.update_from(package.get_build_info()); + final_build_info.update_from(build_info); + build_info = final_build_info; for(BuildInfo::PathList::iterator i=build_info.incpath.begin(); i!=build_info.incpath.end(); ++i) *i = (package.get_source_directory() / *i).str(); for(BuildInfo::PathList::iterator i=build_info.libpath.begin(); i!=build_info.libpath.end(); ++i) *i = (package.get_source_directory() / *i).str(); - final_build_info.update_from(build_info); - build_info = final_build_info; - for(UseList::const_iterator i=uses.begin(); i!=uses.end(); ++i) { /* Select an include path that contains all the sources for this and the @@ -138,7 +137,7 @@ void Component::create_targets() const string inst_loc; if(type==TARBALL) { - const Tool &tar = toolchain.get_tool("TAR"); + Tool &tar = toolchain.get_tool("TAR"); list files; for(SourceList::const_iterator i=source_filenames.begin(); i!=source_filenames.end(); ++i) @@ -171,7 +170,7 @@ void Component::create_targets() const else if(type==INSTALL) { Target *inst = build_graph.get_target("install"); - const Tool © = toolchain.get_tool("CP"); + Tool © = toolchain.get_tool("CP"); for(SourceList::const_iterator i=source_filenames.begin(); i!=source_filenames.end(); ++i) { FileTarget *ft; @@ -184,7 +183,7 @@ void Component::create_targets() const } else if(type==DATAPACK) { - const Tool &dcomp = toolchain.get_tool("DATA"); + Tool &dcomp = toolchain.get_tool("DATA"); list files; for(SourceList::const_iterator i=source_filenames.begin(); i!=source_filenames.end(); ++i) @@ -214,7 +213,7 @@ void Component::create_targets() const for(SourceList::const_iterator i=source_filenames.begin(); i!=source_filenames.end(); ++i) { string ext = FS::extpart(FS::basename(*i)); - const Tool *tool = toolchain.get_tool_for_suffix(ext, true); + Tool *tool = toolchain.get_tool_for_suffix(ext, true); if(tool) { Target *src = tool->create_source(*this, *i); @@ -232,12 +231,12 @@ void Component::create_targets() const } } - const Tool &linker = toolchain.get_tool("LINK"); + Tool &linker = toolchain.get_tool("LINK"); list results; if(type==LIBRARY) { - const Tool &archiver = toolchain.get_tool("AR"); + Tool &archiver = toolchain.get_tool("AR"); results.push_back(linker.create_target(objs, "shared")); results.push_back(archiver.create_target(objs)); } @@ -348,6 +347,8 @@ void Component::Loader::require(const string &n) Package *req = obj.package.get_builder().get_package_manager().find_package(n); if(req) obj.requires.push_back(req); + else + obj.problems.push_back(format("Required package %s not found", n)); } void Component::Loader::source(const string &s)