summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoni Poikelin <joni.poikelin@qt.io>2016-10-12 13:35:37 +0300
committerJoni Poikelin <joni.poikelin@qt.io>2016-11-01 04:41:21 +0000
commitc34d289c449dc8624f31bade882d6f808dae20a1 (patch)
tree4d19330107a16332d800db795915072b4c7313a0
parent1df45820d4ccbb67b9ad0f3eed167342f2917cf8 (diff)
Fix building when lex source refers to a file generated by yacc
Scan lex and yacc sources for dependencies as if they were C source code, which is close enough to reality. This will unfortunately result in the generated source files depending on the generated headers, while it should have been the object files created from these sources which have that dependency. But qmake cannot do better, and this is good enough. Task-number: QTBUG-56507 Change-Id: Ic3e1941bf2e2820bfddf99deba854e1e82f83669 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
-rw-r--r--mkspecs/features/lex.prf1
-rw-r--r--mkspecs/features/yacc.prf1
2 files changed, 2 insertions, 0 deletions
diff --git a/mkspecs/features/lex.prf b/mkspecs/features/lex.prf
index 16d3a6aa94..7d8325bedb 100644
--- a/mkspecs/features/lex.prf
+++ b/mkspecs/features/lex.prf
@@ -5,6 +5,7 @@
{
lex.name = Lex ${QMAKE_FILE_IN}
lex.input = LEXSOURCES
+ lex.dependency_type = TYPE_C
lex_included {
lex.CONFIG += no_link
} else {
diff --git a/mkspecs/features/yacc.prf b/mkspecs/features/yacc.prf
index e78dd8cbb3..72cb5c2f3a 100644
--- a/mkspecs/features/yacc.prf
+++ b/mkspecs/features/yacc.prf
@@ -35,6 +35,7 @@
yacc_impl.name = source for ${QMAKE_FILE_IN}
yacc_impl.input = YACCSOURCES
yacc_impl.variable_out = GENERATED_SOURCES
+ yacc_impl.dependency_type = TYPE_C
yacc_impl.commands = $$escape_expand(\\n) # We don't want any commands where, but if command is empty no rules are created
yacc_impl.depends = $${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}$${QMAKE_MOD_YACC}$${first(QMAKE_EXT_H)} # Make sure we depend on the step above
yacc_impl.output = $${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}$${QMAKE_MOD_YACC}$${first(QMAKE_EXT_CPP)} # Faked output from this step, output really created in step above