From: Mikko Rasa Date: Thu, 7 Feb 2008 15:08:25 +0000 (+0000) Subject: Some fixes to library and header searching X-Git-Tag: 0.9~16 X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=0a0a538e8500381a803f5ecd4168df2f4b2252b1;p=builder.git Some fixes to library and header searching Update readme with new requirements --- diff --git a/Readme.txt b/Readme.txt index 6b6e356..8c5ed24 100644 --- a/Readme.txt +++ b/Readme.txt @@ -16,7 +16,7 @@ this problem, there's a script called bootstrap.sh in the Builder main directory. Before running it, make sure you have the following libraries available: -MSP libraries: core parser path strings +MSP libraries: core datafile path strings io Others: sigc++-2.0 diff --git a/source/builder.cpp b/source/builder.cpp index 15c9e54..caf7fe5 100644 --- a/source/builder.cpp +++ b/source/builder.cpp @@ -217,7 +217,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,8 +234,6 @@ Target *Builder::get_header(const string &include, const string &arch, const str cout<<"Looking for include "<::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) @@ -608,7 +608,10 @@ Target *Builder::get_library(const string &lib, const string &arch, const Path & if(mode!=ALL_STATIC) { if(arch=="win32") + { candidates.push_back("lib"+lib+".dll"); + candidates.push_back(lib+".dll"); + } else candidates.push_back("lib"+lib+".so"); } diff --git a/source/sourcepackage.cpp b/source/sourcepackage.cpp index 42118a1..ef4fd57 100644 --- a/source/sourcepackage.cpp +++ b/source/sourcepackage.cpp @@ -165,7 +165,7 @@ void SourcePackage::init_config() { BinaryPackage *bpkg=dynamic_cast(*i); if(bpkg && bpkg->get_need_path()) - config.add_option(bpkg->get_name()+"_path", "", "Path for "+bpkg->get_name()); + config.add_option(bpkg->get_name()+"_path", "/usr", "Path for "+bpkg->get_name()); } }