make default_pro.prf advertize dynamically created .qmake.cache
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>
Thu, 1 Mar 2012 13:34:48 +0000 (14:34 +0100)
committerQt by Nokia <qt-info@nokia.com>
Thu, 1 Mar 2012 18:00:15 +0000 (19:00 +0100)
moving the detection of .qmake.cache to the qmake startup had the side
effect that a suddenly popping up cache would not be picked up by
nested projects any more.
this is not supposed to work in the first place, but the syncqt hack for
building against non-installed modules relies on it. until we have
cleaned that up properly, we need a way to notify qmake about the
appearance of the cache file.

Change-Id: I450646b936e3bb2ef2ed3aba05df58e521ccdc61
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
mkspecs/features/default_pre.prf
qmake/project.cpp

index 1a56787..9e142f1 100644 (file)
@@ -48,4 +48,7 @@ CONFIG = lex yacc warn_on debug uic resources $$CONFIG
     }
     unset(QTFWD)
     unset(PRO_BASENAME)
+
+    # Let qmake know about the unexpectedly appearing cache file.
+    _QMAKE_CACHE_ = $$QMAKE_SYNCQT_OUTDIR/.qmake.cache
 }
index 0e0ac93..48c5540 100644 (file)
@@ -1177,6 +1177,8 @@ QMakeProject::parse(const QString &t, QHash<QString, QStringList> &place, int nu
         }
         if(var == "REQUIRES") // special case to get communicated to backends!
             doProjectCheckReqs(vallist, place);
+        else if (var == "_QMAKE_CACHE_")
+            Option::mkfile::cachefile = varlist.isEmpty() ? QString() : varlist.at(0);
     }
     return true;
 }