summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--qmake/project.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/qmake/project.cpp b/qmake/project.cpp
index 96cdad8..44eb503 100644
--- a/qmake/project.cpp
+++ b/qmake/project.cpp
@@ -427,49 +427,49 @@ QMakeProject::read(QString project, QString)
427 break; 427 break;
428 } 428 }
429 if(Option::mkfile::cachefile_depth == -1) 429 if(Option::mkfile::cachefile_depth == -1)
430 Option::mkfile::cachefile_depth = 1; 430 Option::mkfile::cachefile_depth = 1;
431 else 431 else
432 Option::mkfile::cachefile_depth++; 432 Option::mkfile::cachefile_depth++;
433 } 433 }
434 } 434 }
435 if(!Option::mkfile::cachefile.isEmpty()) { 435 if(!Option::mkfile::cachefile.isEmpty()) {
436 read(Option::mkfile::cachefile, cache); 436 read(Option::mkfile::cachefile, cache);
437 if(Option::mkfile::qmakespec.isEmpty() && !cache["QMAKESPEC"].isEmpty()) 437 if(Option::mkfile::qmakespec.isEmpty() && !cache["QMAKESPEC"].isEmpty())
438 Option::mkfile::qmakespec = cache["QMAKESPEC"].first(); 438 Option::mkfile::qmakespec = cache["QMAKESPEC"].first();
439 } 439 }
440 } 440 }
441 /* parse mkspec */ 441 /* parse mkspec */
442 QStringList mkspec_roots; 442 QStringList mkspec_roots;
443 /* prefer $QTDIR if it is set */ 443 /* prefer $QTDIR if it is set */
444 /* prefer QMAKESPECSDIR -cl */ 444 /* prefer QMAKESPECSDIR -cl */
445 445
446 if (getenv("QTDIR")) { 446 if (getenv("QTDIR")) {
447 mkspec_roots << getenv("QTDIR"); 447 mkspec_roots << getenv("QTDIR");
448 } 448 }
449 mkspec_roots << qInstallPathData(); 449 mkspec_roots << qInstallPathData();
450 450
451 if (getenv("QMAKESPECSDIR")){ 451 if (Option::mkfile::qmakespec.isEmpty() && getenv("QMAKESPECSDIR")){
452 QString mkspec = QString(getenv("QMAKESPECSDIR")) + QDir::separator() + 452 QString mkspec = QString(getenv("QMAKESPECSDIR")) + QDir::separator() +
453 QDir::separator() + "default"; 453 QDir::separator() + "default";
454 if(QFile::exists(mkspec)) 454 if(QFile::exists(mkspec))
455 Option::mkfile::qmakespec = mkspec; 455 Option::mkfile::qmakespec = mkspec;
456 } 456 }
457 457
458 if(Option::mkfile::qmakespec.isEmpty()) { 458 if(Option::mkfile::qmakespec.isEmpty()) {
459 for(QStringList::Iterator it = mkspec_roots.begin(); it != mkspec_roots.end(); ++it) { 459 for(QStringList::Iterator it = mkspec_roots.begin(); it != mkspec_roots.end(); ++it) {
460 QString mkspec = (*it) + QDir::separator() + QString("mkspecs") + 460 QString mkspec = (*it) + QDir::separator() + QString("mkspecs") +
461 QDir::separator() + "default"; 461 QDir::separator() + "default";
462 if(QFile::exists(mkspec)) { 462 if(QFile::exists(mkspec)) {
463 Option::mkfile::qmakespec = mkspec; 463 Option::mkfile::qmakespec = mkspec;
464 break; 464 break;
465 } 465 }
466 } 466 }
467 } 467 }
468 468
469 if(Option::mkfile::qmakespec.isEmpty()) { 469 if(Option::mkfile::qmakespec.isEmpty()) {
470 fprintf(stderr, "QMAKESPEC has not been set, so configuration cannot be deduced.\n"); 470 fprintf(stderr, "QMAKESPEC has not been set, so configuration cannot be deduced.\n");
471 return FALSE; 471 return FALSE;
472 } 472 }
473 473
474 if(QDir::isRelativePath(Option::mkfile::qmakespec)) { 474 if(QDir::isRelativePath(Option::mkfile::qmakespec)) {
475 bool found_mkspec = FALSE; 475 bool found_mkspec = FALSE;