From 45711a8b73c170c0a145a4dbcb24c91d6446a19d Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 2 Apr 2012 17:04:01 +0200 Subject: write forwarding pris to $outpath/mkspecs/modules this makes qmake find them automatically now. consequently, also do not write QMAKE_EXTRA_MODULE_FORWARDS to .qmake.cache. still write the cache file, though, as otherwise a top-level cache would mess up the module root detection. Change-Id: I998b94fcc73ca3f8bf1af09a394ff8d40cf1fb76 Reviewed-by: Joerg Bornemann --- bin/syncqt | 5 +---- mkspecs/features/default_pre.prf | 2 +- mkspecs/features/qt_config.prf | 12 ++---------- 3 files changed, 4 insertions(+), 15 deletions(-) diff --git a/bin/syncqt b/bin/syncqt index 03d7ea6525..713f8da9f6 100755 --- a/bin/syncqt +++ b/bin/syncqt @@ -1249,13 +1249,10 @@ foreach my $lib (@modules_to_sync) { close MODULE_PRI_FILE; utime(time, (stat($modulepri))[9], $moduleprifwd); if ($cache_module_fwd) { - my $cacheStatement = "QMAKE_EXTRA_MODULE_FORWARDS = \"$module_fwd\""; my $cacheFile = "$out_basedir/.qmake.cache"; - my $existingQmakeCache = fileContents($cacheFile); # Skip if it's already there. - if ($existingQmakeCache !~ $cacheStatement) { + if (!-f $cacheFile) { open QMAKE_CACHE_FILE, ">>$cacheFile" or die("Could not open $cacheFile for writing"); - print QMAKE_CACHE_FILE "$cacheStatement\n"; close(QMAKE_CACHE_FILE); } } diff --git a/mkspecs/features/default_pre.prf b/mkspecs/features/default_pre.prf index 18d0d5f560..a88605b2b7 100644 --- a/mkspecs/features/default_pre.prf +++ b/mkspecs/features/default_pre.prf @@ -7,7 +7,7 @@ CONFIG = lex yacc warn_on debug exceptions $$CONFIG exists($$QTDIR/.qmake.cache) { QTFWD = -module-fwd $$QTDIR/mkspecs/modules -developer-build } else { - QTFWD = -module-fwd $$OUT_PWD/module-paths/modules -cache-module-fwd + QTFWD = -module-fwd $$OUT_PWD/mkspecs/modules -cache-module-fwd } qtPrepareTool(QMAKE_SYNCQT, syncqt) diff --git a/mkspecs/features/qt_config.prf b/mkspecs/features/qt_config.prf index 514c018655..d797775306 100644 --- a/mkspecs/features/qt_config.prf +++ b/mkspecs/features/qt_config.prf @@ -1,19 +1,11 @@ -# This file is loaded by the mkspecs, before .qmake.cache has been loaded. -# Consequently, we have to do some stunts to get values out of the cache. - -exists($$_QMAKE_CACHE_) { - QMAKE_EXTRA_MODULE_FORWARDS = $$fromfile($$_QMAKE_CACHE_, QMAKE_EXTRA_MODULE_FORWARDS) -} QMAKE_QT_CONFIG = $$[QT_HOST_DATA/get]/mkspecs/qconfig.pri !exists($$QMAKE_QT_CONFIG)|!include($$QMAKE_QT_CONFIG, "", true) { debug(1, "Cannot load qconfig.pri!") } else { debug(1, "Loaded .qconfig.pri from ($$QMAKE_QT_CONFIG)") - for(dir, $$list($$unique($$list($$replace($$list($$split($$list($$[QMAKE_MKSPECS]), $$DIRLIST_SEPARATOR)), \ - $, /modules) \ - $$QMAKE_EXTRA_MODULE_FORWARDS)))) { + for(dir, $$list($$split($$list($$[QMAKE_MKSPECS]), $$DIRLIST_SEPARATOR))) { debug(1, "Loading modules from $${dir}") - for(mod, $$list($$files($$dir/qt_*.pri))) { + for(mod, $$list($$files($$dir/modules/qt_*.pri))) { # For installed Qt these paths will be common for all modules # For development these will vary per module, and syncqt will override the value in the # qt_.pri forwarding file -- cgit v1.2.3