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>
This commit is contained in:
parent
1df45820d4
commit
c34d289c44
@ -5,6 +5,7 @@
|
|||||||
{
|
{
|
||||||
lex.name = Lex ${QMAKE_FILE_IN}
|
lex.name = Lex ${QMAKE_FILE_IN}
|
||||||
lex.input = LEXSOURCES
|
lex.input = LEXSOURCES
|
||||||
|
lex.dependency_type = TYPE_C
|
||||||
lex_included {
|
lex_included {
|
||||||
lex.CONFIG += no_link
|
lex.CONFIG += no_link
|
||||||
} else {
|
} else {
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
yacc_impl.name = source for ${QMAKE_FILE_IN}
|
yacc_impl.name = source for ${QMAKE_FILE_IN}
|
||||||
yacc_impl.input = YACCSOURCES
|
yacc_impl.input = YACCSOURCES
|
||||||
yacc_impl.variable_out = GENERATED_SOURCES
|
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.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.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
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user