summaryrefslogtreecommitdiffstats
path: root/mkspecs/features/lex.prf
diff options
context:
space:
mode:
authorAlexis Menard <alexis.menard@nokia.com>2009-04-17 14:06:06 (GMT)
committerAlexis Menard <alexis.menard@nokia.com>2009-04-17 14:06:06 (GMT)
commitf15b8a83e2e51955776a3f07cb85ebfc342dd8ef (patch)
treec5dc684986051654898db11ce73e03b9fec8db99 /mkspecs/features/lex.prf
downloadQt-f15b8a83e2e51955776a3f07cb85ebfc342dd8ef.zip
Qt-f15b8a83e2e51955776a3f07cb85ebfc342dd8ef.tar.gz
Qt-f15b8a83e2e51955776a3f07cb85ebfc342dd8ef.tar.bz2
Initial import of statemachine branch from the old kinetic repository
Diffstat (limited to 'mkspecs/features/lex.prf')
-rw-r--r--mkspecs/features/lex.prf24
1 files changed, 24 insertions, 0 deletions
diff --git a/mkspecs/features/lex.prf b/mkspecs/features/lex.prf
new file mode 100644
index 0000000..df76a68
--- /dev/null
+++ b/mkspecs/features/lex.prf
@@ -0,0 +1,24 @@
+#
+# Lex extra-compiler for handling files specified in the LEXSOURCES variable
+#
+
+{
+ lex.name = Lex ${QMAKE_FILE_IN}
+ lex.input = LEXSOURCES
+ lex_included {
+ lex.CONFIG += no_link
+ } else {
+ lex.variable_out = GENERATED_SOURCES
+ }
+ isEmpty(QMAKE_LEXFLAGS_MANGLE):QMAKE_LEXFLAGS_MANGLE = -P${QMAKE_FILE_BASE}
+ QMAKE_LEXEXTRAFLAGS = $$QMAKE_LEXFLAGS
+ !yacc_no_name_mangle:QMAKE_LEXEXTRAFLAGS += $$QMAKE_LEXFLAGS_MANGLE
+
+ lex.commands = $$QMAKE_LEX $$QMAKE_LEXEXTRAFLAGS ${QMAKE_FILE_IN}$$escape_expand(\n\t) \
+ $$QMAKE_DEL_FILE $${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}_lex$${first(QMAKE_EXT_CPP)}$$escape_expand(\n\t) \
+ $$QMAKE_MOVE lex.${QMAKE_FILE_BASE}.c $${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}_lex$${first(QMAKE_EXT_CPP)}$$escape_expand(\n\t)
+ lex.output = $${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}_lex$${first(QMAKE_EXT_CPP)}
+
+ silent:lex.commands = @echo Lex ${QMAKE_FILE_IN} && $$lex.commands
+ QMAKE_EXTRA_COMPILERS += lex
+}