summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorJason Barron <jbarron@trolltech.com>2009-07-29 08:45:10 +0200
committerJason Barron <jbarron@trolltech.com>2009-07-29 08:45:10 +0200
commit77bd318b2892ad2a6beefee84c8e1436f4f7f386 (patch)
tree0de55e09200679501da73babed5cce1d4b558781 /qmake
parent7eba68adc4a7862d9474179592e5c8393a7acdbb (diff)
parentd22d08f3f8a70edfc66c0f6c2fd952688b64fcc2 (diff)
Merge commit 'qt/master-stable'
Diffstat (limited to 'qmake')
-rw-r--r--qmake/generators/makefiledeps.cpp14
-rw-r--r--qmake/qmake.pro1
2 files changed, 7 insertions, 8 deletions
diff --git a/qmake/generators/makefiledeps.cpp b/qmake/generators/makefiledeps.cpp
index 34a5322f13..d907394bc3 100644
--- a/qmake/generators/makefiledeps.cpp
+++ b/qmake/generators/makefiledeps.cpp
@@ -378,17 +378,19 @@ bool QMakeSourceFileInfo::findDeps(SourceFile *file)
files_changed = true;
file->dep_checked = true;
+ const QMakeLocalFileName sourceFile = fixPathForFile(file->file, true);
+
struct stat fst;
char *buffer = 0;
int buffer_len = 0;
{
int fd;
#if defined(_MSC_VER) && _MSC_VER >= 1400
- if (_sopen_s(&fd, fixPathForFile(file->file, true).local().toLatin1().constData(),
+ if (_sopen_s(&fd, sourceFile.local().toLatin1().constData(),
_O_RDONLY, _SH_DENYNO, _S_IREAD) != 0)
fd = -1;
#else
- fd = open(fixPathForFile(file->file, true).local().toLatin1().constData(), O_RDONLY);
+ fd = open(sourceFile.local().toLatin1().constData(), O_RDONLY);
#endif
if(fd == -1 || fstat(fd, &fst) || S_ISDIR(fst.st_mode))
return false;
@@ -623,12 +625,8 @@ bool QMakeSourceFileInfo::findDeps(SourceFile *file)
QMakeLocalFileName lfn(inc);
if(QDir::isRelativePath(lfn.real())) {
if(try_local) {
- QString dir = findFileInfo(file->file).path();
- if(QDir::isRelativePath(dir))
- dir.prepend(qmake_getpwd() + "/");
- if(!dir.endsWith("/"))
- dir += "/";
- QMakeLocalFileName f(dir + lfn.local());
+ QDir sourceDir = findFileInfo(sourceFile).dir();
+ QMakeLocalFileName f(sourceDir.absoluteFilePath(lfn.local()));
if(findFileInfo(f).exists()) {
lfn = fixPathForFile(f);
exists = true;
diff --git a/qmake/qmake.pro b/qmake/qmake.pro
index 594e698966..acf77181a5 100644
--- a/qmake/qmake.pro
+++ b/qmake/qmake.pro
@@ -15,6 +15,7 @@ MOC_DIR = .
VPATH += $$QT_SOURCE_TREE/src/corelib/global \
$$QT_SOURCE_TREE/src/corelib/tools \
$$QT_SOURCE_TREE/src/corelib/kernel \
+ $$QT_SOURCE_TREE/src/corelib/codecs \
$$QT_SOURCE_TREE/src/corelib/plugin \
$$QT_SOURCE_TREE/src/corelib/io \
$$QT_SOURCE_TREE/src/corelib/xml \