X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbuilder.cpp;h=21e7dcdf629c4a97780059c5d1615cb12dca60b2;hb=b3b2a8666defb9e1a5937bcfefc1bc8e02793aab;hp=d9444ce8a2c878d1eed9e4f9a80456460d43ccbc;hpb=76be6f9f3d6ed0b39044938fa7e424284627eac5;p=builder.git diff --git a/source/builder.cpp b/source/builder.cpp index d9444ce..21e7dcd 100644 --- a/source/builder.cpp +++ b/source/builder.cpp @@ -5,12 +5,13 @@ Copyright © 2006-2007 Mikko Rasa, Mikkosoft Productions Distributed under the LGPL */ -#include #include #include -#include +#include #include #include +#include +#include #include #include #include @@ -217,7 +218,7 @@ Target *Builder::get_header(const string &include, const string &arch, const str StringList argv; argv.push_back(get_architecture(arch).get_tool("CXX")); argv.push_back("--version"); - cxx_ver=Regex(" ([0-9.]+) ").match(run_command(argv))[1].str; + cxx_ver=Regex("[0-9]\\.[0-9.]+").match(run_command(argv))[0].str; while(!cxx_ver.empty() && !exists(Path("/usr/include/c++")/cxx_ver)) { unsigned dot=cxx_ver.rfind('.'); @@ -234,19 +235,19 @@ Target *Builder::get_header(const string &include, const string &arch, const str cout<<"Looking for include "<::const_iterator j=syspath.begin(); (!tgt && j!=syspath.end()); ++j) - tgt=get_header(Path(*j)/fn); + if(include[0]=='\"') + tgt=get_header(Path(from)/fn); for(list::const_iterator j=path.begin(); (!tgt && j!=path.end()); ++j) tgt=get_header(cwd/ *j/fn); + for(list::const_iterator j=syspath.begin(); (!tgt && j!=syspath.end()); ++j) + tgt=get_header(Path(*j)/fn); includes.insert(TargetMap::value_type(id, tgt)); @@ -289,10 +290,10 @@ Target *Builder::get_library(const string &lib, const string &arch, const list=3) cout<<"Reading "<