summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-05-14 11:42:28 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-05-14 11:45:36 (GMT)
commit6d4e67674f0ca5824761ec29f20dd854d47b4ac7 (patch)
treefbb52216e460580def7545bdd0525f1ad16c6abb /mkspecs
parent3ecb04cffdf491f5ea01eceb71de98d6ac647107 (diff)
downloadQt-6d4e67674f0ca5824761ec29f20dd854d47b4ac7.zip
Qt-6d4e67674f0ca5824761ec29f20dd854d47b4ac7.tar.gz
Qt-6d4e67674f0ca5824761ec29f20dd854d47b4ac7.tar.bz2
define qtPrepareTool() function and use it throughout
the function provides a cross-platform way to determine the exact pathname of our build tools (moc, etc.). use it in our .prf files, so we don't have to rely on qmake's unreliable path separator normalization magic in extra compiler commands, which broke on mingw+sh in silent mode. remove the bootstrap tool path setting from configure, as it is redundant now. Reviewed-by: joerg Task-number: QTBUG-10633
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/features/dbusadaptors.prf5
-rw-r--r--mkspecs/features/dbusinterfaces.prf5
-rw-r--r--mkspecs/features/moc.prf5
-rw-r--r--mkspecs/features/qt_functions.prf11
-rw-r--r--mkspecs/features/resources.prf5
-rw-r--r--mkspecs/features/uic.prf12
-rw-r--r--mkspecs/features/win32/qaxcontainer.prf4
-rw-r--r--mkspecs/features/win32/qaxserver.prf3
8 files changed, 20 insertions, 30 deletions
diff --git a/mkspecs/features/dbusadaptors.prf b/mkspecs/features/dbusadaptors.prf
index 241ace6..17dffa5 100644
--- a/mkspecs/features/dbusadaptors.prf
+++ b/mkspecs/features/dbusadaptors.prf
@@ -1,7 +1,4 @@
-isEmpty(QMAKE_QDBUSXML2CPP) {
- win32:QMAKE_QDBUSXML2CPP = $$[QT_INSTALL_BINS]\qdbusxml2cpp.exe
- else:QMAKE_QDBUSXML2CPP = $$[QT_INSTALL_BINS]/qdbusxml2cpp
-}
+qtPrepareTool(QMAKE_QDBUSXML2CPP, qdbusxml2cpp)
for(DBUS_ADAPTOR, $$list($$unique(DBUS_ADAPTORS))) {
diff --git a/mkspecs/features/dbusinterfaces.prf b/mkspecs/features/dbusinterfaces.prf
index c32597a..412e80f 100644
--- a/mkspecs/features/dbusinterfaces.prf
+++ b/mkspecs/features/dbusinterfaces.prf
@@ -1,9 +1,6 @@
load(moc)
-isEmpty(QMAKE_QDBUSXML2CPP) {
- win32:QMAKE_QDBUSXML2CPP = $$[QT_INSTALL_BINS]\qdbusxml2cpp.exe
- else:QMAKE_QDBUSXML2CPP = $$[QT_INSTALL_BINS]/qdbusxml2cpp
-}
+qtPrepareTool(QMAKE_QDBUSXML2CPP, qdbusxml2cpp)
for(DBUS_INTERFACE, $$list($$unique(DBUS_INTERFACES))) {
diff --git a/mkspecs/features/moc.prf b/mkspecs/features/moc.prf
index e4b7dae..e1296ec 100644
--- a/mkspecs/features/moc.prf
+++ b/mkspecs/features/moc.prf
@@ -1,9 +1,6 @@
#global defaults
-isEmpty(QMAKE_MOC) {
- contains(QMAKE_HOST.os,Windows):QMAKE_MOC = $$[QT_INSTALL_BINS]\moc.exe
- else:QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
-}
+qtPrepareTool(QMAKE_MOC, moc)
isEmpty(MOC_DIR):MOC_DIR = .
isEmpty(QMAKE_H_MOD_MOC):QMAKE_H_MOD_MOC = moc_
isEmpty(QMAKE_EXT_CPP_MOC):QMAKE_EXT_CPP_MOC = .moc
diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
index 1be6d9b..23e2616 100644
--- a/mkspecs/features/qt_functions.prf
+++ b/mkspecs/features/qt_functions.prf
@@ -78,3 +78,14 @@ defineTest(qtAddLibrary) {
export(QMAKE_LFLAGS)
return(true)
}
+
+# variable, default
+defineTest(qtPrepareTool) {
+ isEmpty($$1) {
+ !isEmpty(QT_BUILD_TREE):$$1 = $$QT_BUILD_TREE/bin/$$2
+ else:$$1 = $$[QT_INSTALL_BINS]/$$2
+ }
+ $$1 ~= s,[/\\\\],$$QMAKE_DIR_SEP,
+ contains(QMAKE_HOST.os, Windows):!contains($$1, \.exe$):$$1 = $$eval($$1).exe
+ export($$1)
+}
diff --git a/mkspecs/features/resources.prf b/mkspecs/features/resources.prf
index 8ccd576..5d00a4d 100644
--- a/mkspecs/features/resources.prf
+++ b/mkspecs/features/resources.prf
@@ -1,7 +1,4 @@
-isEmpty(QMAKE_RCC) {
- win32:QMAKE_RCC = $$[QT_INSTALL_BINS]\rcc.exe
- else:QMAKE_RCC = $$[QT_INSTALL_BINS]/rcc
-}
+qtPrepareTool(QMAKE_RCC, rcc)
isEmpty(RCC_DIR):RCC_DIR = .
isEmpty(QMAKE_RESOURCE_PREFIX):QMAKE_RESOURCE_PREFIX = /tmp/
diff --git a/mkspecs/features/uic.prf b/mkspecs/features/uic.prf
index eaf373a..d108f24 100644
--- a/mkspecs/features/uic.prf
+++ b/mkspecs/features/uic.prf
@@ -1,13 +1,5 @@
-
-isEmpty(QMAKE_UIC3) {
- contains(QMAKE_HOST.os,Windows):QMAKE_UIC3 = $$[QT_INSTALL_BINS]\uic3.exe
- else:QMAKE_UIC3 = $$[QT_INSTALL_BINS]/uic3
-}
-
-isEmpty(QMAKE_UIC) {
- contains(QMAKE_HOST.os,Windows):QMAKE_UIC = $$[QT_INSTALL_BINS]\uic.exe
- else:QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
-}
+qtPrepareTool(QMAKE_UIC3, uic3)
+qtPrepareTool(QMAKE_UIC, uic)
isEmpty(UI_DIR):UI_DIR = .
isEmpty(UI_SOURCES_DIR):UI_SOURCES_DIR = $$UI_DIR
diff --git a/mkspecs/features/win32/qaxcontainer.prf b/mkspecs/features/win32/qaxcontainer.prf
index 49edb2a..34c6dfe 100644
--- a/mkspecs/features/win32/qaxcontainer.prf
+++ b/mkspecs/features/win32/qaxcontainer.prf
@@ -8,9 +8,7 @@
LIBS += -lQAxContainer
}
-isEmpty(QMAKE_DUMPCPP) {
- win32:QMAKE_DUMPCPP = $$[QT_INSTALL_BINS]\dumpcpp.exe
-}
+qtPrepareTool(QMAKE_DUMPCPP, dumpcpp)
dumpcpp_decl.commands = $$QMAKE_DUMPCPP ${QMAKE_FILE_IN} -o ${QMAKE_FILE_BASE}
qaxcontainer_compat: dumpcpp_decl.commands += -compat
diff --git a/mkspecs/features/win32/qaxserver.prf b/mkspecs/features/win32/qaxserver.prf
index a18c421..1ff6825 100644
--- a/mkspecs/features/win32/qaxserver.prf
+++ b/mkspecs/features/win32/qaxserver.prf
@@ -14,7 +14,8 @@ equals(TEMPLATE, "vcapp"):ACTIVEQT_IDE = VisualStudio
equals(TEMPLATE, "vclib"):ACTIVEQT_IDE = VisualStudio
equals(ACTIVEQT_IDE, "VisualStudio") {
- ACTIVEQT_IDC = $${QMAKE_IDC}
+ ACTIVEQT_IDC = $${QMAKE_IDC} ### Qt5: remove me
+ qtPrepareTool(ACTIVEQT_IDC, idc)
ACTIVEQT_IDL = $${QMAKE_IDL}
ACTIVEQT_TARGET = "$(TargetPath)"
win32-msvc {