X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbuilder.cpp;h=2c137ca406841a1159269851f8177261504c91c9;hb=b1a6e6dcdd7e0da272ab0ebbed4e295f83f1165a;hp=e6f036b7028f409ec0851615d068152dd1547966;hpb=b0eb979b0dc79269cb3bb5bb2e67ef4e80689cfe;p=builder.git diff --git a/source/builder.cpp b/source/builder.cpp index e6f036b..2c137ca 100644 --- a/source/builder.cpp +++ b/source/builder.cpp @@ -132,7 +132,8 @@ Package *Builder::get_package(const string &n) Package *pkg=Package::create(*this, n); packages.insert(PackageMap::value_type(n, pkg)); - new_pkgs.push_back(pkg); + if(pkg) + new_pkgs.push_back(pkg); return pkg; } @@ -216,17 +217,12 @@ int Builder::main() std::list missing; for(PackageMap::iterator i=packages.begin(); i!=packages.end(); ++i) - { - const list &requires=i->second->get_requires(); - for(list::const_iterator j=requires.begin(); j!=requires.end(); ++j) - if(!j->get_package()) - missing.push_back(j->get_name()); - } + if(!i->second) + missing.push_back(i->first); if(!missing.empty()) { missing.sort(); - missing.unique(); cerr<<"The following packages were not found on the system:\n"; for(list::iterator i=missing.begin(); i!=missing.end(); ++i) cerr<<" "<<*i<<'\n'; @@ -305,6 +301,10 @@ int Builder::create_targets() if(!i->second->get_buildable()) continue; + Path::Path inst_base; + if(i->second->get_config().is_option("prefix")) + inst_base=i->second->get_config().get_option("prefix").value; + const ComponentList &components=i->second->get_components(); for(ComponentList::const_iterator j=components.begin(); j!=components.end(); ++j) { @@ -317,8 +317,6 @@ int Builder::create_targets() files.push_back(*k / *l); } - Path::Path inst_base=i->second->get_config().get_option("prefix").value; - bool build_exe=j->get_type()!=Component::HEADERS; list objs;