summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--qmake/project.cpp23
1 files changed, 15 insertions, 8 deletions
diff --git a/qmake/project.cpp b/qmake/project.cpp
index ae24193..96cdad8 100644
--- a/qmake/project.cpp
+++ b/qmake/project.cpp
@@ -441,14 +441,20 @@ QMakeProject::read(QString project, QString)
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 /* minor hack here, prefer QMAKESPECDIR -cl */ 444 /* prefer QMAKESPECSDIR -cl */
445 445
446 if (getenv("QMAKESPECDIR")){ 446 if (getenv("QTDIR")) {
447 mkspec_roots << getenv("QMAKESPECDIR");
448 } else if (getenv("QTDIR")) {
449 mkspec_roots << getenv("QTDIR"); 447 mkspec_roots << getenv("QTDIR");
450 } 448 }
451 mkspec_roots << qInstallPathData(); 449 mkspec_roots << qInstallPathData();
450
451 if (getenv("QMAKESPECSDIR")){
452 QString mkspec = QString(getenv("QMAKESPECSDIR")) + QDir::separator() +
453 QDir::separator() + "default";
454 if(QFile::exists(mkspec))
455 Option::mkfile::qmakespec = mkspec;
456 }
457
452 if(Option::mkfile::qmakespec.isEmpty()) { 458 if(Option::mkfile::qmakespec.isEmpty()) {
453 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) {
454 QString mkspec = (*it) + QDir::separator() + QString("mkspecs") + 460 QString mkspec = (*it) + QDir::separator() + QString("mkspecs") +
@@ -458,10 +464,11 @@ QMakeProject::read(QString project, QString)
458 break; 464 break;
459 } 465 }
460 } 466 }
461 if(Option::mkfile::qmakespec.isEmpty()) { 467 }
462 fprintf(stderr, "QMAKESPEC has not been set, so configuration cannot be deduced.\n"); 468
463 return FALSE; 469 if(Option::mkfile::qmakespec.isEmpty()) {
464 } 470 fprintf(stderr, "QMAKESPEC has not been set, so configuration cannot be deduced.\n");
471 return FALSE;
465 } 472 }
466 473
467 if(QDir::isRelativePath(Option::mkfile::qmakespec)) { 474 if(QDir::isRelativePath(Option::mkfile::qmakespec)) {