summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2011-03-29 18:17:18 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2011-04-12 10:00:37 (GMT)
commite22e36bc61b4af7c0a9113617df5a35ed315dede (patch)
treee572ca1297bd476b21cc164222ed7d95e0a91ffa /qmake
parent8caba032245dfa310a77c22c1e55137c54e59f4f (diff)
downloadQt-e22e36bc61b4af7c0a9113617df5a35ed315dede.zip
Qt-e22e36bc61b4af7c0a9113617df5a35ed315dede.tar.gz
Qt-e22e36bc61b4af7c0a9113617df5a35ed315dede.tar.bz2
look for makespec in the build dir first
it's more natural to look into the build dir before the source dir, and it's what the qmake-generated makefiles mean when re-invoking qmake. specifically, this works around the problem that relative paths with excess ".."s pointing below the root are happily ignored and thus truly bizarre makespec paths may be constructed by the qmake re-invocations if the source dir is less nested than the build dir. Task-number: QTBUG-9817 Reviewed-by: mariusSO
Diffstat (limited to 'qmake')
-rw-r--r--qmake/project.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/qmake/project.cpp b/qmake/project.cpp
index d4f21be..177ab2f 100644
--- a/qmake/project.cpp
+++ b/qmake/project.cpp
@@ -1345,10 +1345,10 @@ QMakeProject::read(uchar cmd)
}
if(QDir::isRelativePath(qmakespec)) {
- if (QFile::exists(qmakespec+"/qmake.conf")) {
- Option::mkfile::qmakespec = QFileInfo(Option::mkfile::qmakespec).absoluteFilePath();
- } else if (QFile::exists(Option::output_dir+"/"+qmakespec+"/qmake.conf")) {
+ if (QFile::exists(Option::output_dir+"/"+qmakespec+"/qmake.conf")) {
qmakespec = Option::mkfile::qmakespec = QFileInfo(Option::output_dir+"/"+qmakespec).absoluteFilePath();
+ } else if (QFile::exists(qmakespec+"/qmake.conf")) {
+ Option::mkfile::qmakespec = QFileInfo(Option::mkfile::qmakespec).absoluteFilePath();
} else {
bool found_mkspec = false;
for(QStringList::ConstIterator it = mkspec_roots.begin(); it != mkspec_roots.end(); ++it) {