summaryrefslogtreecommitdiff
path: root/qmake
authorkergoth <kergoth>2002-11-01 16:20:04 (UTC)
committer kergoth <kergoth>2002-11-01 16:20:04 (UTC)
commit4c9df59925da5a67d884f8ffb37a263d85948951 (patch) (side-by-side diff)
tree278796d7d27a06243e584a05f443dbb23eaf028c /qmake
parentebd6adcd2f72935f0ee7af7485c75c34ac3389a3 (diff)
downloadopie-4c9df59925da5a67d884f8ffb37a263d85948951.zip
opie-4c9df59925da5a67d884f8ffb37a263d85948951.tar.gz
opie-4c9df59925da5a67d884f8ffb37a263d85948951.tar.bz2
Make qmake obey QMAKESPECSDIR if set.
Diffstat (limited to 'qmake') (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)
/* parse mkspec */
QStringList mkspec_roots;
/* prefer $QTDIR if it is set */
- /* minor hack here, prefer QMAKESPECDIR -cl */
+ /* prefer QMAKESPECSDIR -cl */
- if (getenv("QMAKESPECDIR")){
- mkspec_roots << getenv("QMAKESPECDIR");
- } else if (getenv("QTDIR")) {
+ if (getenv("QTDIR")) {
mkspec_roots << getenv("QTDIR");
}
mkspec_roots << qInstallPathData();
+
+ if (getenv("QMAKESPECSDIR")){
+ QString mkspec = QString(getenv("QMAKESPECSDIR")) + QDir::separator() +
+ QDir::separator() + "default";
+ if(QFile::exists(mkspec))
+ Option::mkfile::qmakespec = mkspec;
+ }
+
if(Option::mkfile::qmakespec.isEmpty()) {
for(QStringList::Iterator it = mkspec_roots.begin(); it != mkspec_roots.end(); ++it) {
QString mkspec = (*it) + QDir::separator() + QString("mkspecs") +
@@ -458,10 +464,11 @@ QMakeProject::read(QString project, QString)
break;
}
}
- if(Option::mkfile::qmakespec.isEmpty()) {
- fprintf(stderr, "QMAKESPEC has not been set, so configuration cannot be deduced.\n");
- return FALSE;
- }
+ }
+
+ if(Option::mkfile::qmakespec.isEmpty()) {
+ fprintf(stderr, "QMAKESPEC has not been set, so configuration cannot be deduced.\n");
+ return FALSE;
}
if(QDir::isRelativePath(Option::mkfile::qmakespec)) {