]> git.tdb.fi Git - builder.git/commitdiff
Some fixes to library and header searching
authorMikko Rasa <tdb@tdb.fi>
Thu, 7 Feb 2008 15:08:25 +0000 (15:08 +0000)
committerMikko Rasa <tdb@tdb.fi>
Thu, 7 Feb 2008 15:08:25 +0000 (15:08 +0000)
Update readme with new requirements

Readme.txt
source/builder.cpp
source/sourcepackage.cpp

index 6b6e3569e48c45283d450be887e66b882bfce2b7..8c5ed2498d4b648639b015003445540c913c4eaf 100644 (file)
@@ -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
 
index 15c9e5455f84e0946fc01ef8c569181063d79394..caf7fe54eb10bf4a618c750f0235fc61936ed425 100644 (file)
@@ -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 "<<fn<<" with path "<<join(path.begin(), path.end())<<'\n';
 
        StringList syspath;
-       if(include[0]=='\"')
-               syspath.push_back(from);
        if(arch=="native")
                syspath.push_back("/usr/include");
        else
@@ -243,6 +241,8 @@ Target *Builder::get_header(const string &include, const string &arch, const str
        syspath.push_back((Path("/usr/include/c++/")/cxx_ver/fn).str());
 
        Target *tgt=0;
+       if(include[0]=='\"')
+               tgt=get_header(Path(from)/fn);
        for(list<string>::const_iterator j=path.begin(); (!tgt && j!=path.end()); ++j)
                tgt=get_header(cwd/ *j/fn);
        for(list<string>::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");
        }
index 42118a16cd56056b80214bb17b5b854df7bb4f25..ef4fd5760a26fd1a90f7fb077d3256612c4b9fca 100644 (file)
@@ -165,7 +165,7 @@ void SourcePackage::init_config()
        {
                BinaryPackage *bpkg=dynamic_cast<BinaryPackage *>(*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());
        }
 }