From 014af3e99616f9ee13ca365566828f7daf77a7f6 Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Wed, 15 Apr 2009 10:36:40 +1000 Subject: 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 --- mkspecs/features/moc.prf | 19 ++++++++++--------- 1 file 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) } -- cgit v0.12