From c34d289c449dc8624f31bade882d6f808dae20a1 Mon Sep 17 00:00:00 2001 From: Joni Poikelin Date: Wed, 12 Oct 2016 13:35:37 +0300 Subject: 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 --- mkspecs/features/lex.prf | 1 + mkspecs/features/yacc.prf | 1 + 2 files changed, 2 insertions(+) (limited to 'mkspecs') 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 -- cgit v1.2.3