]> git.tdb.fi Git - builder.git/commitdiff
Make sure to use absolute paths when looking for headers/libraries
authorMikko Rasa <tdb@tdb.fi>
Wed, 18 Oct 2006 18:05:09 +0000 (18:05 +0000)
committerMikko Rasa <tdb@tdb.fi>
Wed, 18 Oct 2006 18:05:09 +0000 (18:05 +0000)
source/builder.cpp

index e9491eb8a9bc417c350b6b2f55a378b69bffa7b0..274b153e70c566a2fa2dff2147918cc2d2474a37 100644 (file)
@@ -191,7 +191,7 @@ Target *Builder::get_header(const string &include, const string &from, const lis
        if((tgt=check_header(Path::Path("/usr/include/c++/4.1.2")/fn)))
                return tgt;
        for(list<string>::const_iterator j=path.begin(); j!=path.end(); ++j)
-               if((tgt=check_header(Path::Path(*j)/fn)))
+               if((tgt=check_header(Path::getcwd()/ *j/fn)))
                        return tgt;
        
        return 0;
@@ -211,7 +211,7 @@ Target *Builder::get_library(const string &lib, const list<string> &path)
        string basename="lib"+lib+".so";
        for(list<string>::const_iterator j=path.begin(); j!=path.end(); ++j)
        {
-               string full=(Path::Path(*j)/basename).str();
+               string full=(Path::getcwd()/ *j/basename).str();
                Target *tgt=get_target(full);
                if(tgt) return tgt;