summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIain <qt-info@nokia.com>2010-02-04 10:29:34 +0000
committerIain <qt-info@nokia.com>2010-02-04 10:41:59 +0000
commit3569038ffec0c133ff29f80d506f334cc0f2ddb3 (patch)
treed53ed10b73c27dc495bcb51491b7b30d25d068bc
parentbd202b822401989aa1abe3e2ad24344d71d6dfb3 (diff)
Further bug fixes for enable/disables DEF files mechanism on Symbian
Fix bug where all target types, including apps, plugins and static libraries were getting DEFFILE statements - now it's just libraries that get it. Fix bug where duplicate DEFFILE blocks were being added to projects that manually specified their own DEFFILE - this now tests for the qmake variable "defBlock" being set, and doesn't add additional DEFFILE statements if it is. NOTE: This means that adding DEFFILE statements to MMP_RULES manually should be done by creating a variable called defBlock, and adding that to the MMP_RULES (ie. MMP_RULES += defBlock) Fix bug in configure.exe, where using -nokia-developer for Windows builds would warn about Symbian DEF file usage (or lack thereof) Reviewed-by: Janne Koskinen Reviewed-by: Jason Barron
-rw-r--r--configure.exebin1178112 -> 1180160 bytes
-rw-r--r--mkspecs/features/symbian/def_files.prf48
-rw-r--r--mkspecs/features/symbian/def_files_disabled.prf12
-rw-r--r--tools/configure/configureapp.cpp4
4 files changed, 40 insertions, 24 deletions
diff --git a/configure.exe b/configure.exe
index 21fdcfa0b5..8913de159f 100644
--- a/configure.exe
+++ b/configure.exe
Binary files differ
diff --git a/mkspecs/features/symbian/def_files.prf b/mkspecs/features/symbian/def_files.prf
index c29d4ec363..48d91aa7c6 100644
--- a/mkspecs/features/symbian/def_files.prf
+++ b/mkspecs/features/symbian/def_files.prf
@@ -3,24 +3,32 @@
CONFIG -= def_files_disabled
-!isEmpty(defFilePath) {
- defBlock = \
- "$${LITERAL_HASH}ifdef WINSCW" \
- "DEFFILE $$defFilePath/bwins/$${TARGET}.def" \
- "$${LITERAL_HASH}elif defined EABI" \
- "DEFFILE $$defFilePath/eabi/$${TARGET}.def" \
- "$${LITERAL_HASH}endif"
-
- MMP_RULES += defBlock
-} else {
- # If defFilePath is not defined, then put the folders containing the DEF files at the
- # same level as the .pro (and generated MMP) file(s)
- defBlock = \
- "$${LITERAL_HASH}ifdef WINSCW" \
- "DEFFILE ./bwins/$${TARGET}.def" \
- "$${LITERAL_HASH}elif defined EABI" \
- "DEFFILE ./eabi/$${TARGET}.def" \
- "$${LITERAL_HASH}endif"
-
- MMP_RULES += defBlock
+# Firstly, if the MMP_RULES already contain a defBlock variable, don't generate another one
+# (this bit is slightly magic, because it depends upon everyone creating their DEFFILE statements
+# in a defBlock variable; but otherwise we have to expand MMP_RULES then scan for the DEFFILE keyword)
+!contains(MMP_RULES, defBlock) {
+ # Apps are executables on Symbian, so don't have exports, and therefore don't have DEF files
+ # Plugins use standard DEF files, which qmake generates, so shouldn't be using these DEFFILE
+ # statements - they use the qmake generated statements instead
+ # Static libraries obviously don't have DEF files, as they don't take part in dynamic linkage
+ !contains(TEMPLATE, app):!contains(CONFIG, plugin):!contains(CONFIG, staticlib): {
+ !isEmpty(defFilePath) {
+ defBlock = \
+ "$${LITERAL_HASH}ifdef WINSCW" \
+ "DEFFILE $$defFilePath/bwins/$${TARGET}.def" \
+ "$${LITERAL_HASH}elif defined EABI" \
+ "DEFFILE $$defFilePath/eabi/$${TARGET}.def" \
+ "$${LITERAL_HASH}endif"
+ } else {
+ # If defFilePath is not defined, then put the folders containing the DEF files at the
+ # same level as the .pro (and generated MMP) file(s)
+ defBlock = \
+ "$${LITERAL_HASH}ifdef WINSCW" \
+ "DEFFILE ./bwins/$${TARGET}.def" \
+ "$${LITERAL_HASH}elif defined EABI" \
+ "DEFFILE ./eabi/$${TARGET}.def" \
+ "$${LITERAL_HASH}endif"
+ }
+ MMP_RULES += defBlock
+ }
}
diff --git a/mkspecs/features/symbian/def_files_disabled.prf b/mkspecs/features/symbian/def_files_disabled.prf
index d5c9505a43..557c5e3b6b 100644
--- a/mkspecs/features/symbian/def_files_disabled.prf
+++ b/mkspecs/features/symbian/def_files_disabled.prf
@@ -2,6 +2,12 @@
CONFIG -= def_files
-# with EXPORTUNFROZEN enabled, new exports are included in the dll without
-# needing to run abld/sbs freeze
-MMP_RULES += EXPORTUNFROZEN
+# See def_files.prf for reasoning on the slight nastiness of this
+!contains(MMP_RULES, defBlock) {
+ # See def_files.prf for reasoning for excluding target types and configs below
+ !contains(TEMPLATE, app):!contains(CONFIG, plugin):!contains(CONFIG, staticlib): {
+ # with EXPORTUNFROZEN enabled, new exports are included in the dll and dso/lib without
+ # needing to run abld/sbs freeze
+ MMP_RULES += EXPORTUNFROZEN
+ }
+}
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 8d1b640bdd..83b4d9c320 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -482,7 +482,9 @@ void Configure::parseCmdLine()
dictionary[ "BUILDNOKIA" ] = "yes";
dictionary[ "BUILDDEV" ] = "yes";
dictionary["LICENSE_CONFIRMED"] = "yes";
- dictionary[ "SYMBIAN_DEFFILES" ] = "no";
+ if (dictionary.contains("XQMAKESPEC") && dictionary["XQMAKESPEC"].startsWith("symbian")) {
+ dictionary[ "SYMBIAN_DEFFILES" ] = "no";
+ }
}
else if( configCmdLine.at(i) == "-opensource" ) {
dictionary[ "BUILDTYPE" ] = "opensource";