0
|
1 |
#
|
|
2 |
# Lex extra-compiler for handling files specified in the LEXSOURCES variable
|
|
3 |
#
|
|
4 |
|
|
5 |
{
|
|
6 |
lex.name = Lex ${QMAKE_FILE_IN}
|
|
7 |
lex.input = LEXSOURCES
|
|
8 |
lex_included {
|
|
9 |
lex.CONFIG += no_link
|
|
10 |
} else {
|
|
11 |
lex.variable_out = GENERATED_SOURCES
|
|
12 |
}
|
|
13 |
isEmpty(QMAKE_LEXFLAGS_MANGLE):QMAKE_LEXFLAGS_MANGLE = -P${QMAKE_FILE_BASE}
|
|
14 |
QMAKE_LEXEXTRAFLAGS = $$QMAKE_LEXFLAGS
|
|
15 |
!yacc_no_name_mangle:QMAKE_LEXEXTRAFLAGS += $$QMAKE_LEXFLAGS_MANGLE
|
|
16 |
|
|
17 |
lex.commands = $$QMAKE_LEX $$QMAKE_LEXEXTRAFLAGS ${QMAKE_FILE_IN}$$escape_expand(\n\t) \
|
|
18 |
$$QMAKE_DEL_FILE $${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}_lex$${first(QMAKE_EXT_CPP)}$$escape_expand(\n\t) \
|
|
19 |
$$QMAKE_MOVE lex.${QMAKE_FILE_BASE}.c $${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}_lex$${first(QMAKE_EXT_CPP)}$$escape_expand(\n\t)
|
|
20 |
lex.output = $${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}_lex$${first(QMAKE_EXT_CPP)}
|
|
21 |
|
|
22 |
silent:lex.commands = @echo Lex ${QMAKE_FILE_IN} && $$lex.commands
|
|
23 |
QMAKE_EXTRA_COMPILERS += lex
|
|
24 |
}
|