summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2012-06-29 09:05:36 +0200
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2012-06-29 09:06:37 +0200
commit1491065506eb97c9def93b908db1df9fcdf3fff0 (patch)
tree8241e72cc1016b41c08f9d14e81fb63c07e6a5ba /mkspecs
parent551e1e63d9da18787ae72fc3f0e76f28dbe5f7e3 (diff)
parent61c775684fe38f3c1e1bc7599e21054aedba523c (diff)
Merge branch 'buildsystem' (second round)
refactoring and cleanup. fixes x-builds between different os families. Conflicts: mkspecs/features/qt.prf Change-Id: I0205e6f07f77c9b015cf055dd87a471883949a91
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/features/qt.prf6
-rw-r--r--mkspecs/features/qt_config.prf5
-rw-r--r--mkspecs/features/spec_post.prf31
-rw-r--r--mkspecs/features/spec_pre.prf39
-rw-r--r--mkspecs/features/win32/default_post.prf11
5 files changed, 75 insertions, 17 deletions
diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf
index 03e58b3afd..1d1e17c541 100644
--- a/mkspecs/features/qt.prf
+++ b/mkspecs/features/qt.prf
@@ -14,12 +14,6 @@ win32 {
} else {
DEFINES += QT_NODLL
}
-
- # Some files include qplatformdefs.h, which lives in the individual mkspec directory
- # However, if QMAKESPEC_ORIGINAL is set, the module/app is outside of the QtBase
- # directory, and using the default profile. So we add the original mkspecs directory
- # to the include path
- !isEmpty(QMAKESPEC_ORIGINAL):INCLUDEPATH += $$QMAKESPEC_ORIGINAL
}
CONFIG(release, debug|release):DEFINES += QT_NO_DEBUG
contains(QT_CONFIG, force_asserts):DEFINES += QT_FORCE_ASSERTS
diff --git a/mkspecs/features/qt_config.prf b/mkspecs/features/qt_config.prf
index 07fd988fb5..305ff1cb81 100644
--- a/mkspecs/features/qt_config.prf
+++ b/mkspecs/features/qt_config.prf
@@ -24,6 +24,11 @@ QMAKE_QT_CONFIG = $$[QT_HOST_DATA/get]/mkspecs/qconfig.pri
include($$mod)
}
}
+ unset(QT_MODULE_INCLUDE_BASE)
+ unset(QT_MODULE_LIB_BASE)
+ unset(QT_MODULE_PLUGIN_BASE)
+ unset(QT_MODULE_BIN_BASE)
+ unset(QT_MODULE_IMPORT_BASE)
}
load(qt_functions)
diff --git a/mkspecs/features/spec_post.prf b/mkspecs/features/spec_post.prf
new file mode 100644
index 0000000000..fcc7314ce5
--- /dev/null
+++ b/mkspecs/features/spec_post.prf
@@ -0,0 +1,31 @@
+isEmpty(MAKEFILE_GENERATOR):error("Qmake spec does not set MAKEFILE_GENERATOR.")
+isEmpty(QMAKE_PLATFORM) {
+ isEmpty(TARGET_PLATFORM) {
+ equals(MAKEFILE_GENERATOR, UNIX) {
+ equals(QMAKE_HOST.os, Darwin): \
+ TARGET_PLATFORM = macx
+ else: \
+ TARGET_PLATFORM = unix
+ } else:if(equals(MAKEFILE_GENERATOR, MSVC.NET) \
+ |equals(MAKEFILE_GENERATOR, BMAKE) \
+ |equals(MAKEFILE_GENERATOR, MSBUILD) \
+ |equals(MAKEFILE_GENERATOR, MINGW)) {
+ TARGET_PLATFORM = win32
+ } else:if(equals(MAKEFILE_GENERATOR, PROJECTBUILDER) \
+ |equals(MAKEFILE_GENERATOR, XCODE)) {
+ } else:equals(MAKEFILE_GENERATOR, GBUILD) {
+ TARGET_PLATFORM = unix
+ } else {
+ error("Qmake spec sets an invalid MAKEFILE_GENERATOR.")
+ }
+ }
+ equals(TARGET_PLATFORM, unix): \
+ QMAKE_PLATFORM = unix
+ else:equals(TARGET_PLATFORM, macx): \
+ QMAKE_PLATFORM = mac macx unix
+ else:equals(TARGET_PLATFORM, win32): \
+ QMAKE_PLATFORM = win32
+ else: \
+ error("Qmake spec sets an invalid TARGET_PLATFORM.")
+}
+CONFIG += $$QMAKE_PLATFORM
diff --git a/mkspecs/features/spec_pre.prf b/mkspecs/features/spec_pre.prf
new file mode 100644
index 0000000000..bcd4a08449
--- /dev/null
+++ b/mkspecs/features/spec_pre.prf
@@ -0,0 +1,39 @@
+QMAKE_DIR_SEP = $$DIR_SEPARATOR
+QMAKE_DIRLIST_SEP = $$DIRLIST_SEPARATOR
+
+QMAKE_EXT_C = .c
+QMAKE_EXT_CPP = .cpp .cc .cxx
+QMAKE_EXT_CPP_MOC = .moc
+QMAKE_EXT_H = .h .hpp .hh .hxx
+QMAKE_EXT_H_MOC = .cpp
+QMAKE_EXT_JS = .js
+QMAKE_EXT_LEX = .l
+QMAKE_EXT_LIBTOOL = .la
+QMAKE_EXT_PKGCONFIG = .pc
+QMAKE_EXT_PRL = .prl
+QMAKE_EXT_UI = .ui
+QMAKE_EXT_YACC = .y
+
+QMAKE_CPP_MOD_MOC =
+QMAKE_H_MOD_MOC = moc_
+QMAKE_MOD_LEX = _lex
+QMAKE_MOD_YACC = _yacc
+
+equals(QMAKE_HOST.os, Windows) {
+ QMAKE_EXT_OBJ = .obj
+ QMAKE_EXT_RES = .res
+ QMAKE_SH =
+ PATH = $$split($$(PATH), ;)
+ for(dir, PATH) {
+ exists($$dir/sh.exe) {
+ QMAKE_SH = $$dir/sh.exe
+ break()
+ }
+ }
+ unset(PATH)
+} else {
+ QMAKE_EXT_CPP += .C
+ QMAKE_EXT_H += .H
+ QMAKE_EXT_OBJ = .o
+ QMAKE_SH = sh
+}
diff --git a/mkspecs/features/win32/default_post.prf b/mkspecs/features/win32/default_post.prf
deleted file mode 100644
index a1d8b52da9..0000000000
--- a/mkspecs/features/win32/default_post.prf
+++ /dev/null
@@ -1,11 +0,0 @@
-!isEmpty(CE_ARCH) {
- QMAKESPEC_DIR = $$QMAKESPEC
- exists($$QMAKESPEC_DIR/default_post.prf) {
- isEmpty(QMAKESPEC_DIR):QMAKESPEC_DIR = $$QMAKESPEC_ORIGINAL
- !isEmpty(QMAKESPEC_DIR):load($$QMAKESPEC_DIR/default_post.prf)
- }
-}
-
-# Now load the global default_post
-load(default_post)
-