summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@theqtcompany.com>2015-10-26 13:47:03 +0100
committerJoerg Bornemann <joerg.bornemann@theqtcompany.com>2015-10-27 17:02:47 +0000
commit691671893aedcd54792b57afa9ed2724ccdc6657 (patch)
treedb0e30508f90ba822754cc48bb882f22090519dc /src
parent2f7d3cf559e0bdf8643e213de3a36796f6a88bd3 (diff)
fix race in ANGLE build
The flex and bison rules generated the same files for debug and release. This conflicts in parallel builds, e.g. when using jom. Task-number: QTBUG-49003 Change-Id: I6f64760d83292e8bfad6fd0b4f8fbdd386e2213b Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/angle/src/compiler/preprocessor/preprocessor.pro8
-rw-r--r--src/angle/src/compiler/translator.pro16
-rw-r--r--src/angle/src/config.pri2
3 files changed, 14 insertions, 12 deletions
diff --git a/src/angle/src/compiler/preprocessor/preprocessor.pro b/src/angle/src/compiler/preprocessor/preprocessor.pro
index 759a3399b4..12f644870d 100644
--- a/src/angle/src/compiler/preprocessor/preprocessor.pro
+++ b/src/angle/src/compiler/preprocessor/preprocessor.pro
@@ -41,15 +41,15 @@ SOURCES += \
$$ANGLE_DIR/src/compiler/preprocessor/Token.cpp
# NOTE: 'flex' and 'bison' can be found in qt5/gnuwin32/bin
-flex.commands = $$addGnuPath(flex) --noline --nounistd --outfile=${QMAKE_FILE_BASE}.cpp ${QMAKE_FILE_NAME}
-flex.output = ${QMAKE_FILE_BASE}.cpp
+flex.commands = $$addGnuPath(flex) --noline --nounistd --outfile=${QMAKE_FILE_OUT} ${QMAKE_FILE_NAME}
+flex.output = $${BUILDSUBDIR}${QMAKE_FILE_BASE}.cpp
flex.input = FLEX_SOURCES
flex.dependency_type = TYPE_C
flex.variable_out = GENERATED_SOURCES
QMAKE_EXTRA_COMPILERS += flex
-bison.commands = $$addGnuPath(bison) --no-lines --skeleton=yacc.c --output=${QMAKE_FILE_BASE}.cpp ${QMAKE_FILE_NAME}
-bison.output = ${QMAKE_FILE_BASE}.cpp
+bison.commands = $$addGnuPath(bison) --no-lines --skeleton=yacc.c --output=${QMAKE_FILE_OUT} ${QMAKE_FILE_NAME}
+bison.output = $${BUILDSUBDIR}${QMAKE_FILE_BASE}.cpp
bison.input = BISON_SOURCES
bison.dependency_type = TYPE_C
bison.variable_out = GENERATED_SOURCES
diff --git a/src/angle/src/compiler/translator.pro b/src/angle/src/compiler/translator.pro
index 9572a51ad4..eebe41b09e 100644
--- a/src/angle/src/compiler/translator.pro
+++ b/src/angle/src/compiler/translator.pro
@@ -163,16 +163,16 @@ SOURCES += \
# NOTE: 'flex' and 'bison' can be found in qt5/gnuwin32/bin
-flex.commands = $$addGnuPath(flex) --noline --nounistd --outfile=${QMAKE_FILE_BASE}_lex.cpp ${QMAKE_FILE_NAME}
-flex.output = ${QMAKE_FILE_BASE}_lex.cpp
+flex.commands = $$addGnuPath(flex) --noline --nounistd --outfile=${QMAKE_FILE_OUT} ${QMAKE_FILE_NAME}
+flex.output = $${BUILDSUBDIR}${QMAKE_FILE_BASE}_lex.cpp
flex.input = FLEX_SOURCES
flex.dependency_type = TYPE_C
flex.variable_out = GENERATED_SOURCES
QMAKE_EXTRA_COMPILERS += flex
-bison.commands = $$addGnuPath(bison) --no-lines --skeleton=yacc.c --defines=${QMAKE_FILE_BASE}_tab.h \
- --output=${QMAKE_FILE_BASE}_tab.cpp ${QMAKE_FILE_NAME}
-bison.output = ${QMAKE_FILE_BASE}_tab.h
+bison.commands = $$addGnuPath(bison) --no-lines --skeleton=yacc.c --defines=${QMAKE_FILE_OUT} \
+ --output=${QMAKE_FILE_OUT_BASE}.cpp ${QMAKE_FILE_NAME}
+bison.output = $${BUILDSUBDIR}${QMAKE_FILE_BASE}_tab.h
bison.input = BISON_SOURCES
bison.dependency_type = TYPE_C
bison.variable_out = GENERATED_SOURCES
@@ -182,10 +182,10 @@ QMAKE_EXTRA_COMPILERS += bison
# have one output file even if the command generates two.
MAKEFILE_NOOP_COMMAND = @echo -n
msvc: MAKEFILE_NOOP_COMMAND = @echo >NUL
-bison_impl.output = ${QMAKE_FILE_BASE}_tab.cpp
+bison_impl.output = $${BUILDSUBDIR}${QMAKE_FILE_BASE}_tab.cpp
bison_impl.input = BISON_SOURCES
bison_impl.commands = $$MAKEFILE_NOOP_COMMAND
-bison_impl.depends = ${QMAKE_FILE_BASE}_tab.h
-bison_impl.output = ${QMAKE_FILE_BASE}_tab.cpp
+bison_impl.depends = $${BUILDSUBDIR}${QMAKE_FILE_BASE}_tab.h
+bison_impl.output = $${BUILDSUBDIR}${QMAKE_FILE_BASE}_tab.cpp
bison_impl.variable_out = GENERATED_SOURCES
QMAKE_EXTRA_COMPILERS += bison_impl
diff --git a/src/angle/src/config.pri b/src/angle/src/config.pri
index 0d75245ec5..085913ac83 100644
--- a/src/angle/src/config.pri
+++ b/src/angle/src/config.pri
@@ -53,6 +53,8 @@ CONFIG(debug, debug|release) {
DEFINES += NDEBUG
}
+!isEmpty(BUILD_PASS): BUILDSUBDIR = $$lower($$BUILD_PASS)/
+
# c++11 is needed by MinGW to get support for unordered_map.
CONFIG += stl exceptions c++11