From 692de02818d574dbfb510ed66ee358fa9af5a36a Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 11 Dec 2012 22:22:23 +0100 Subject: [PATCH] add some docu about the project loading sequence Change-Id: Icb6bb58247724aeb6b9433a8d032718f1ba4babe Reviewed-by: Joerg Bornemann --- mkspecs/features/default_post.prf | 2 ++ mkspecs/features/default_pre.prf | 4 ++++ mkspecs/features/device_config.prf | 2 ++ mkspecs/features/qt_config.prf | 2 ++ mkspecs/features/spec_post.prf | 6 ++++++ mkspecs/features/spec_pre.prf | 4 ++++ 6 files changed, 20 insertions(+) diff --git a/mkspecs/features/default_post.prf b/mkspecs/features/default_post.prf index 5359953d90..3afab5240e 100644 --- a/mkspecs/features/default_post.prf +++ b/mkspecs/features/default_post.prf @@ -1,3 +1,5 @@ +# This file is loaded by qmake right after loading the actual project file. + contains(TEMPLATE, ".*(lib|app)"):CONFIG += have_target !have_target:!force_qt: CONFIG -= qt diff --git a/mkspecs/features/default_pre.prf b/mkspecs/features/default_pre.prf index b6019047d1..4323910e4a 100644 --- a/mkspecs/features/default_pre.prf +++ b/mkspecs/features/default_pre.prf @@ -1,3 +1,7 @@ +# This file is loaded by qmake right before each actual project file. +# Note that evaluating variable assignments from the command line +# still happens in between these two steps. + load(exclusive_builds) CONFIG = \ lex yacc warn_on debug exceptions depend_includepath \ diff --git a/mkspecs/features/device_config.prf b/mkspecs/features/device_config.prf index a4dd6253cc..cb1de0b947 100644 --- a/mkspecs/features/device_config.prf +++ b/mkspecs/features/device_config.prf @@ -1,3 +1,5 @@ +# This file is loaded by some qmakespecs to get early configuration data. + # Load generated qdevice.pri DEVICE_PRI = $$[QT_HOST_DATA/get]/mkspecs/qdevice.pri exists($$DEVICE_PRI):include($$DEVICE_PRI) diff --git a/mkspecs/features/qt_config.prf b/mkspecs/features/qt_config.prf index 3b2b62e139..061399d78c 100644 --- a/mkspecs/features/qt_config.prf +++ b/mkspecs/features/qt_config.prf @@ -1,3 +1,5 @@ +# This file is loaded as one of the last things by all qmakespecs. + 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!") diff --git a/mkspecs/features/spec_post.prf b/mkspecs/features/spec_post.prf index a58690e8a6..46a512bf17 100644 --- a/mkspecs/features/spec_post.prf +++ b/mkspecs/features/spec_post.prf @@ -1,3 +1,9 @@ +# This file is loaded by qmake right after loading the qmakespec. +# Afterwards, the project's .qmake.conf and .qmake.cache are loaded +# (if present). +# Note that up to this point, nothing specific to a particular SUBDIRS +# project or build pass can be done. + isEmpty(MAKEFILE_GENERATOR):error("Qmake spec does not set MAKEFILE_GENERATOR.") isEmpty(QMAKE_PLATFORM) { isEmpty(TARGET_PLATFORM) { diff --git a/mkspecs/features/spec_pre.prf b/mkspecs/features/spec_pre.prf index 14e3ac90de..844fa35579 100644 --- a/mkspecs/features/spec_pre.prf +++ b/mkspecs/features/spec_pre.prf @@ -1,3 +1,7 @@ +# This file is loaded by qmake right before loading the qmakespec. +# At this point, the built-in variables have been set up and the project's +# .qmake.super was read (if present). + QMAKE_DIR_SEP = $$DIR_SEPARATOR QMAKE_DIRLIST_SEP = $$DIRLIST_SEPARATOR