summaryrefslogtreecommitdiffstats
path: root/mkspecs/features/moc.prf
diff options
context:
space:
mode:
authorRohan McGovern <rohan.mcgovern@nokia.com>2009-04-15 00:36:40 (GMT)
committerRohan McGovern <rohan.mcgovern@nokia.com>2009-04-15 00:48:41 (GMT)
commit014af3e99616f9ee13ca365566828f7daf77a7f6 (patch)
treeba0f8952fe01c14528b21384cf1881c71c977785 /mkspecs/features/moc.prf
parent6e5774d84e7e3b68736f95fae09a084bd5b9ac7a (diff)
downloadQt-014af3e99616f9ee13ca365566828f7daf77a7f6.zip
Qt-014af3e99616f9ee13ca365566828f7daf77a7f6.tar.gz
Qt-014af3e99616f9ee13ca365566828f7daf77a7f6.tar.bz2
Fixes WebKit still occasionally failing to compile with MinGW when
passing any `-j' to make. Change 6e5774d84e7e3b68736f95fae09a084bd5b9ac7a made the problem much less likely to occur, but in a debug_and_release build, debug and release would share the same mocinclude.tmp. Therefore, if exceptionally unlucky, the bug could still arise. Put mocinclude.tmp under MOC_DIR so each exclusive build has its own. Reviewed-by: Lincoln Ramsay
Diffstat (limited to 'mkspecs/features/moc.prf')
-rw-r--r--mkspecs/features/moc.prf19
1 files changed, 10 insertions, 9 deletions
diff --git a/mkspecs/features/moc.prf b/mkspecs/features/moc.prf
index 975867e..7c4ff28 100644
--- a/mkspecs/features/moc.prf
+++ b/mkspecs/features/moc.prf
@@ -11,13 +11,14 @@ isEmpty(QMAKE_EXT_CPP_MOC):QMAKE_EXT_CPP_MOC = .moc
# On Windows, put the includes into a .inc file which moc will read, if the project
# has too many includes. We do this to overcome a command-line limit on Win < XP
INCLUDETEMP=
+WIN_INCLUDETEMP=
win32:count($$list($$INCPATH), 40, >) {
- INCLUDETEMP = mocinclude.tmp
+ INCLUDETEMP = $$MOC_DIR/mocinclude.tmp
# Remove any existing mocinclude.tmp when qmake runs
- WIN_OUT_PWD=$$OUT_PWD
- WIN_OUT_PWD~=s,/,\,g
- system($$QMAKE_DEL_FILE $$WIN_OUT_PWD\\$$INCLUDETEMP > NUL 2>&1)
+ WIN_INCLUDETEMP=$$INCLUDETEMP
+ WIN_INCLUDETEMP~=s,/,\,g
+ system($$QMAKE_DEL_FILE $$WIN_INCLUDETEMP > NUL 2>&1)
EOC = $$escape_expand(\n\t)
@@ -32,10 +33,10 @@ win32:count($$list($$INCPATH), 40, >) {
RET =
for(incfile, $$list($$INCPATH)) {
INCFILELIST = -I$$incfile
- isEmpty(RET): RET += @echo $$INCFILELIST> $$INCLUDETEMP $$EOC
- else: RET += @echo $$INCFILELIST>> $$INCLUDETEMP $$EOC
+ isEmpty(RET): RET += @echo $$INCFILELIST> $$WIN_INCLUDETEMP $$EOC
+ else: RET += @echo $$INCFILELIST>> $$WIN_INCLUDETEMP $$EOC
}
- !isEmpty(INCFILELIST):RET += @echo $$INCFILELIST>> $$INCLUDETEMP $$EOC
+ !isEmpty(INCFILELIST):RET += @echo $$INCFILELIST>> $$WIN_INCLUDETEMP $$EOC
build_pass|isEmpty(BUILDS) {
mocinclude.target = $$INCLUDETEMP
@@ -45,8 +46,8 @@ win32:count($$list($$INCPATH), 40, >) {
}
defineReplace(mocCmd) {
- !isEmpty(INCLUDETEMP) {
- return($$QMAKE_MOC $(DEFINES) @$$INCLUDETEMP $$join(QMAKE_COMPILER_DEFINES, " -D", -D) $$1 -o $$2)
+ !isEmpty(WIN_INCLUDETEMP) {
+ return($$QMAKE_MOC $(DEFINES) @$$WIN_INCLUDETEMP $$join(QMAKE_COMPILER_DEFINES, " -D", -D) $$1 -o $$2)
}
return($$QMAKE_MOC $(DEFINES) $(INCPATH) $$join(QMAKE_COMPILER_DEFINES, " -D", -D) $$1 -o $$2)
}