From 0d5649713af91dcce58a623bbef7d38e2fbdf13b Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Thu, 10 Jun 2010 14:35:03 +0200 Subject: use "win32-g++*" scope to match all MinGW makespecs The scope "win32-g++" comes from the name of the makespec. However, it is frequently used to check for MinGW. This works fine as long as win32-g++ is the only makespec for MinGW. Now we need the wildcard to cover "win32-g++-cross" as well. Also reordered test of win32 before win32-g++*. Also took opportunity to use else. Merge-request: 2407 Reviewed-by: Oswald Buddenhagen --- doc/doc.pri | 6 +++--- examples/activeqt/activeqt.pro | 2 +- qmake/qmake.pri | 2 +- src/3rdparty/javascriptcore/WebKit.pri | 2 +- .../webkit/JavaScriptCore/JavaScriptCore.pro | 2 +- src/3rdparty/webkit/WebCore/WebCore.pro | 4 ++-- src/3rdparty/webkit/WebKit.pri | 2 +- src/3rdparty/webkit/WebKit/qt/Api/DerivedSources.pro | 2 +- src/activeqt/container/container.pro | 2 +- src/activeqt/control/control.pro | 4 ++-- src/gui/painting/painting.pri | 2 +- src/plugins/sqldrivers/psql/psql.pro | 4 ++-- src/sql/drivers/drivers.pri | 20 +++++++++----------- src/winmain/winmain.pro | 2 +- .../auto/qprocess/testProcessEOF/testProcessEOF.pro | 2 +- tests/auto/qsqldriver/qsqldriver.pro | 2 +- .../qsqlrelationaltablemodel.pro | 2 +- .../qtcpserver/crashingServer/crashingServer.pro | 2 +- tools/activeqt/testcon/testcon.pro | 2 +- .../assistant/lib/fulltextsearch/fulltextsearch.pro | 2 +- tools/configure/configure.pro | 2 +- 21 files changed, 34 insertions(+), 36 deletions(-) diff --git a/doc/doc.pri b/doc/doc.pri index 0a5cc9a..f748f3d 100644 --- a/doc/doc.pri +++ b/doc/doc.pri @@ -5,9 +5,9 @@ DOCS_GENERATION_DEFINES = GENERATOR = $$QT_BUILD_TREE/bin/qhelpgenerator -win32:!win32-g++ { +win32:!win32-g++* { unixstyle = false -} else :win32-g++:isEmpty(QMAKE_SH) { +} else :win32-g++*:isEmpty(QMAKE_SH) { unixstyle = false } else { unixstyle = true @@ -41,7 +41,7 @@ QT_JA_JP_DOCUMENTATION = ($$QDOC qt-api-only_ja_JP.qdocconf) && \ $$GENERATOR doc-build/html-qt_ja_JP/qt.qhp -o doc/qch/qt_ja_JP.qch \ ) -win32-g++:isEmpty(QMAKE_SH) { +win32-g++*:isEmpty(QMAKE_SH) { QT_DOCUMENTATION = $$replace(QT_DOCUMENTATION, "/", "\\\\") QT_ZH_CN_DOCUMENTATION = $$replace(QT_ZH_CN_DOCUMENTATION, "/", "\\\\") QT_JA_JP_DOCUMENTATION = $$replace(QT_JA_JP_DOCUMENTATION, "/", "\\\\") diff --git a/examples/activeqt/activeqt.pro b/examples/activeqt/activeqt.pro index 262e1a1..79d257a 100644 --- a/examples/activeqt/activeqt.pro +++ b/examples/activeqt/activeqt.pro @@ -11,7 +11,7 @@ contains(QT_CONFIG, opengl):SUBDIRS += opengl # For now only the contain examples with mingw, for the others you need # an IDL compiler -win32-g++|wince*:SUBDIRS = webbrowser +win32-g++*|wince*:SUBDIRS = webbrowser # install target.path = $$[QT_INSTALL_EXAMPLES]/activeqt diff --git a/qmake/qmake.pri b/qmake/qmake.pri index 6e0f8a2..a7e0ab1 100644 --- a/qmake/qmake.pri +++ b/qmake/qmake.pri @@ -134,7 +134,7 @@ bootstrap { #Qt code } else:win32 { SOURCES += qfsfileengine_win.cpp qfsfileengine_iterator_win.cpp qsettings_win.cpp win32-msvc*:LIBS += ole32.lib advapi32.lib - win32-g++:LIBS += -lole32 -luuid + win32-g++*:LIBS += -lole32 -luuid } qnx { diff --git a/src/3rdparty/javascriptcore/WebKit.pri b/src/3rdparty/javascriptcore/WebKit.pri index 0dd0799..9aaaa99 100644 --- a/src/3rdparty/javascriptcore/WebKit.pri +++ b/src/3rdparty/javascriptcore/WebKit.pri @@ -36,7 +36,7 @@ building-libs { win32-*|wince* { CONFIG(debug, debug|release):build_pass: QTWEBKITLIBNAME = $${QTWEBKITLIBNAME}d QTWEBKITLIBNAME = $${QTWEBKITLIBNAME}$${QT_MAJOR_VERSION} - win32-g++: LIBS += -l$$QTWEBKITLIBNAME + win32-g++*: LIBS += -l$$QTWEBKITLIBNAME else: LIBS += $${QTWEBKITLIBNAME}.lib } else { LIBS += -lQtWebKit diff --git a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro index 22fcc91..3f1ac86 100644 --- a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro +++ b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro @@ -43,7 +43,7 @@ CONFIG(QTDIR_build) { } # Pick up 3rdparty libraries from INCLUDE/LIB just like with MSVC -win32-g++ { +win32-g++* { TMPPATH = $$quote($$(INCLUDE)) QMAKE_INCDIR_POST += $$split(TMPPATH,";") TMPPATH = $$quote($$(LIB)) diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro index 048fc93..92082b5 100644 --- a/src/3rdparty/webkit/WebCore/WebCore.pro +++ b/src/3rdparty/webkit/WebCore/WebCore.pro @@ -103,7 +103,7 @@ win32-msvc2005|win32-msvc2008:{ } # Pick up 3rdparty libraries from INCLUDE/LIB just like with MSVC -win32-g++ { +win32-g++* { TMPPATH = $$quote($$(INCLUDE)) QMAKE_INCDIR_POST += $$split(TMPPATH,";") TMPPATH = $$quote($$(LIB)) @@ -2935,7 +2935,7 @@ CONFIG(QTDIR_build) { CONFIG += no_debug_info } -!win32-g++:win32:contains(QMAKE_HOST.arch, x86_64):{ +win32:!win32-g++*:contains(QMAKE_HOST.arch, x86_64):{ asm_compiler.commands = ml64 /c asm_compiler.commands += /Fo ${QMAKE_FILE_OUT} ${QMAKE_FILE_IN} asm_compiler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)} diff --git a/src/3rdparty/webkit/WebKit.pri b/src/3rdparty/webkit/WebKit.pri index 921a6e0..fcd2891 100644 --- a/src/3rdparty/webkit/WebKit.pri +++ b/src/3rdparty/webkit/WebKit.pri @@ -24,7 +24,7 @@ building-libs { win32-*|wince* { !CONFIG(release, debug|release):build_pass: QTWEBKITLIBNAME = $${QTWEBKITLIBNAME}d QTWEBKITLIBNAME = $${QTWEBKITLIBNAME}$${QT_MAJOR_VERSION} - win32-g++: LIBS += -l$$QTWEBKITLIBNAME + win32-g++*: LIBS += -l$$QTWEBKITLIBNAME else: LIBS += $${QTWEBKITLIBNAME}.lib } else { LIBS += -lQtWebKit diff --git a/src/3rdparty/webkit/WebKit/qt/Api/DerivedSources.pro b/src/3rdparty/webkit/WebKit/qt/Api/DerivedSources.pro index 22d4c8d..62546f6 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/DerivedSources.pro +++ b/src/3rdparty/webkit/WebKit/qt/Api/DerivedSources.pro @@ -12,7 +12,7 @@ DOUBLE_ESCAPED_QUOTE = "" ESCAPE = "" win32-msvc*|symbian { ESCAPE = "^" -} else:win32-g++:isEmpty(QMAKE_SH) { +} else:win32-g++*:isEmpty(QMAKE_SH) { # MinGW's make will run makefile commands using sh, even if make # was run from the Windows shell, if it finds sh in the path. ESCAPE = "^" diff --git a/src/activeqt/container/container.pro b/src/activeqt/container/container.pro index d654f92..4c9b3a8 100644 --- a/src/activeqt/container/container.pro +++ b/src/activeqt/container/container.pro @@ -19,7 +19,7 @@ QTDIR_build:DESTDIR = $$QT_BUILD_TREE/lib LIBS += -lole32 -loleaut32 !wince*:LIBS += -luser32 -lgdi32 -ladvapi32 -win32-g++:LIBS += -luuid +win32-g++*:LIBS += -luuid HEADERS = ../control/qaxaggregated.h \ qaxbase.h \ diff --git a/src/activeqt/control/control.pro b/src/activeqt/control/control.pro index 44eb928..361ca29 100644 --- a/src/activeqt/control/control.pro +++ b/src/activeqt/control/control.pro @@ -18,11 +18,11 @@ CONFIG += qt warn_off staticlib QTDIR_build:DESTDIR = $$QT_BUILD_TREE\\lib DEFINES += QAX_SERVER -win32-g++:DEFINES += QT_NEEDS_QMAIN +win32-g++*:DEFINES += QT_NEEDS_QMAIN win32-borland:DEFINES += QT_NEEDS_QMAIN LIBS += -luser32 -lole32 -loleaut32 -lgdi32 -win32-g++:LIBS += -luuid +win32-g++*:LIBS += -luuid HEADERS = qaxaggregated.h \ qaxbindable.h \ diff --git a/src/gui/painting/painting.pri b/src/gui/painting/painting.pri index 123af1c..c3b0e3e 100644 --- a/src/gui/painting/painting.pri +++ b/src/gui/painting/painting.pri @@ -234,7 +234,7 @@ contains(QMAKE_MAC_XARCH, no) { IWMMXT_SOURCES += painting/qdrawhelper_iwmmxt.cpp } - win32-g++|!win32:!*-icc* { + win32-g++*|!win32:!*-icc* { mmx { mmx_compiler.commands = $$QMAKE_CXX -c -Winline diff --git a/src/plugins/sqldrivers/psql/psql.pro b/src/plugins/sqldrivers/psql/psql.pro index 0a38ee4..80a5348 100644 --- a/src/plugins/sqldrivers/psql/psql.pro +++ b/src/plugins/sqldrivers/psql/psql.pro @@ -4,7 +4,7 @@ HEADERS = ../../../sql/drivers/psql/qsql_psql.h SOURCES = main.cpp \ ../../../sql/drivers/psql/qsql_psql.cpp -unix|win32-g++: { +unix|win32-g++*: { !isEmpty(QT_LFLAGS_PSQL) { !contains(QT_CONFIG, system-zlib): QT_LFLAGS_PSQL -= -lz !static:LIBS *= $$QT_LFLAGS_PSQL @@ -13,6 +13,6 @@ unix|win32-g++: { !contains(LIBS, .*pq.*):LIBS *= -lpq } -win32:!win32-g++:!contains(LIBS, .*pq.* ) LIBS *= -llibpq -lws2_32 -ladvapi32 +win32:!win32-g++*:!contains(LIBS, .*pq.* ) LIBS *= -llibpq -lws2_32 -ladvapi32 include(../qsqldriverbase.pri) diff --git a/src/sql/drivers/drivers.pri b/src/sql/drivers/drivers.pri index 8dfc50f..05e7265 100644 --- a/src/sql/drivers/drivers.pri +++ b/src/sql/drivers/drivers.pri @@ -6,16 +6,14 @@ contains(sql-drivers, psql) { HEADERS += drivers/psql/qsql_psql.h SOURCES += drivers/psql/qsql_psql.cpp - unix|win32-g++ { + unix|win32-g++* { !static:!isEmpty(QT_LFLAGS_PSQL) { !contains(QT_CONFIG, system-zlib): QT_LFLAGS_PSQL -= -lz !static:LIBS *= $$QT_LFLAGS_PSQL QMAKE_CXXFLAGS *= $$QT_CFLAGS_PSQL } !contains(LIBS, .*pq.*):LIBS *= -lpq - } - - win32:!win32-g++:!contains(LIBS, .*pq.* ) LIBS *= -llibpq -lws2_32 -ladvapi32 + } else:win32:!contains(LIBS, .*pq.* ) LIBS *= -llibpq -lws2_32 -ladvapi32 } contains(sql-drivers, mysql) { @@ -35,8 +33,8 @@ contains(sql-drivers, mysql) { } win32:!contains(LIBS, .*mysql.*):!contains(LIBS, .*mysqld.*) { - !win32-g++:LIBS *= -llibmysql - win32-g++:LIBS *= -lmysql + !win32-g++*:LIBS *= -llibmysql + else:LIBS *= -lmysql } } @@ -49,8 +47,8 @@ contains(sql-drivers, odbc) { unix:DEFINES += UNICODE win32 { - !win32-borland:LIBS *= -lodbc32 - win32-borland:LIBS *= $(BCB)/lib/PSDK/odbc32.lib + !win32-borland:LIBS *= -lodbc32 + else:LIBS *= $(BCB)/lib/PSDK/odbc32.lib } } @@ -71,7 +69,7 @@ contains(sql-drivers, tds) { win32 { !win32-borland:LIBS += -lNTWDBLIB - win32-borland:LIBS += $(BCB)/lib/PSDK/NTWDBLIB.LIB + else:LIBS += $(BCB)/lib/PSDK/NTWDBLIB.LIB } } @@ -83,7 +81,7 @@ contains(sql-drivers, db2) { win32 { !win32-borland:LIBS += -ldb2cli -# win32-borland:LIBS += $(BCB)/lib/PSDK/db2cli.lib +# else:LIBS += $(BCB)/lib/PSDK/db2cli.lib } } @@ -95,7 +93,7 @@ contains(sql-drivers, ibase) { win32 { !win32-borland:LIBS *= -lgds32_ms - win32-borland:LIBS += gds32.lib + else:LIBS += gds32.lib } } diff --git a/src/winmain/winmain.pro b/src/winmain/winmain.pro index bc322b9..efee3cd 100644 --- a/src/winmain/winmain.pro +++ b/src/winmain/winmain.pro @@ -8,7 +8,7 @@ CONFIG += staticlib warn_on CONFIG -= qt shared win32 { - win32-g++:DEFINES += QT_NEEDS_QMAIN + win32-g++*:DEFINES += QT_NEEDS_QMAIN win32-borland:DEFINES += QT_NEEDS_QMAIN SOURCES = qtmain_win.cpp CONFIG += png zlib diff --git a/tests/auto/qprocess/testProcessEOF/testProcessEOF.pro b/tests/auto/qprocess/testProcessEOF/testProcessEOF.pro index f406759..756bd23 100644 --- a/tests/auto/qprocess/testProcessEOF/testProcessEOF.pro +++ b/tests/auto/qprocess/testProcessEOF/testProcessEOF.pro @@ -2,7 +2,7 @@ SOURCES = main.cpp CONFIG -= qt app_bundle CONFIG += console -!win32-g++:win32:!equals(TEMPLATE_PREFIX, "vc"):QMAKE_CXXFLAGS += /GS- +win32:!win32-g++*:!equals(TEMPLATE_PREFIX, "vc"):QMAKE_CXXFLAGS += /GS- DESTDIR = ./ diff --git a/tests/auto/qsqldriver/qsqldriver.pro b/tests/auto/qsqldriver/qsqldriver.pro index d04ca83..2e9ed67 100644 --- a/tests/auto/qsqldriver/qsqldriver.pro +++ b/tests/auto/qsqldriver/qsqldriver.pro @@ -9,7 +9,7 @@ wince*: { DEPLOYMENT += plugFiles LIBS += -lws2 } else { - win32-g++ { + win32-g++* { LIBS += -lws2_32 } else:win32 { LIBS += ws2_32.lib diff --git a/tests/auto/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro b/tests/auto/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro index ee4f2f0..c6681d5 100644 --- a/tests/auto/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro +++ b/tests/auto/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro @@ -17,7 +17,7 @@ wince*: { } } } else { - win32-g++ { + win32-g++* { LIBS += -lws2_32 } else:win32 { LIBS += ws2_32.lib diff --git a/tests/auto/qtcpserver/crashingServer/crashingServer.pro b/tests/auto/qtcpserver/crashingServer/crashingServer.pro index 70e42b4..0bea655 100644 --- a/tests/auto/qtcpserver/crashingServer/crashingServer.pro +++ b/tests/auto/qtcpserver/crashingServer/crashingServer.pro @@ -5,4 +5,4 @@ DESTDIR = ./ # This means the auto test works on some machines for MinGW. No dialog stalls # the application. -win32-g++:CONFIG += console +win32-g++*:CONFIG += console diff --git a/tools/activeqt/testcon/testcon.pro b/tools/activeqt/testcon/testcon.pro index dc98218..89f8067 100644 --- a/tools/activeqt/testcon/testcon.pro +++ b/tools/activeqt/testcon/testcon.pro @@ -16,6 +16,6 @@ RC_FILE = testcon.rc win32-borland { QMAKE_POST_LINK = -midl $$QT_SOURCE_TREE/tools/activeqt/testcon/testcon.idl } else { - !win32-g++:QMAKE_POST_LINK = midl $$QT_SOURCE_TREE/tools/activeqt/testcon/testcon.idl && move testcon.tlb $(TARGETDIR) + !win32-g++*:QMAKE_POST_LINK = midl $$QT_SOURCE_TREE/tools/activeqt/testcon/testcon.idl && move testcon.tlb $(TARGETDIR) } diff --git a/tools/assistant/lib/fulltextsearch/fulltextsearch.pro b/tools/assistant/lib/fulltextsearch/fulltextsearch.pro index fb1a0dd..4d2fddb 100644 --- a/tools/assistant/lib/fulltextsearch/fulltextsearch.pro +++ b/tools/assistant/lib/fulltextsearch/fulltextsearch.pro @@ -29,7 +29,7 @@ unix:QMAKE_PKGCONFIG_REQUIRES = QtCore CONFIG(exceptions_off) { CONFIG -= exceptions_off CONFIG += exceptions - !win32|win32-g++ { + !win32|win32-g++* { QMAKE_CFLAGS -= -fno-exceptions QMAKE_CXXFLAGS -= -fno-exceptions QMAKE_LFLAGS -= -fno-exceptions diff --git a/tools/configure/configure.pro b/tools/configure/configure.pro index d926a76..64a6d9a 100644 --- a/tools/configure/configure.pro +++ b/tools/configure/configure.pro @@ -8,7 +8,7 @@ DEFINES += QT_BOOTSTRAPPED win32 : LIBS += -lole32 -ladvapi32 win32-msvc.net | win32-msvc2* : QMAKE_CXXFLAGS += /EHsc -win32-g++ : LIBS += -luuid +win32-g++* : LIBS += -luuid win32-msvc* { QMAKE_CFLAGS_RELEASE -= -MD -- cgit v0.12