From 5be4499ad19b66e1626f6c6eb1849803e08126d6 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sat, 4 Aug 2007 02:13:52 +0000 Subject: Add a script as a front-end for Flex, to work around various problems, such as the fact that Flex strips all but the last component of the "-o" argument, and that it doesn't generate a header file to declare routines the generated lexical analyzer defines. Use that script when building lexical analyzers, and, for each lexical analyzer, include the generated header file in the generated analyzer. svn path=/trunk/; revision=22446 --- plugins/mate/Makefile.am | 5 +++++ plugins/mate/Makefile.common | 1 + plugins/mate/Makefile.nmake | 6 +++++- plugins/mate/mate_parser.l | 1 + 4 files changed, 12 insertions(+), 1 deletion(-) (limited to 'plugins/mate') diff --git a/plugins/mate/Makefile.am b/plugins/mate/Makefile.am index d4b3af143f..34f45d9347 100644 --- a/plugins/mate/Makefile.am +++ b/plugins/mate/Makefile.am @@ -122,6 +122,7 @@ DISTCLEANFILES = \ MAINTAINERCLEANFILES = \ Makefile.in \ mate_parser.c \ + mate_parser_lex.h \ plugin.c EXTRA_DIST = \ @@ -132,6 +133,10 @@ EXTRA_DIST = \ moduleinfo.nmake \ plugin.rc.in +RUNLEX = $(top_srcdir)/tools/runlex.sh + +mate_parser_lex.h : mate_parser.c + LEMON = ../../tools/lemon mate_grammar.h : mate_grammar.c diff --git a/plugins/mate/Makefile.common b/plugins/mate/Makefile.common index 8003e753f4..73432c488f 100644 --- a/plugins/mate/Makefile.common +++ b/plugins/mate/Makefile.common @@ -34,6 +34,7 @@ DISSECTOR_SRC = \ DISSECTOR_INCLUDES = \ mate.h \ mate_grammar.h \ + mate_parser_lex.h \ mate_util.h # Dissector helpers. They're included in the source files in this diff --git a/plugins/mate/Makefile.nmake b/plugins/mate/Makefile.nmake index 99f9f93eae..9043776cb1 100644 --- a/plugins/mate/Makefile.nmake +++ b/plugins/mate/Makefile.nmake @@ -107,10 +107,14 @@ clean: # the same for now. # distclean: clean - rm -f mate_parser.c mate_grammar.c mate_grammar.h mate_grammar.out + rm -f mate_parser.c mate_parser_lex.h mate_grammar.c \ + mate_grammar.h mate_grammar.out maintainer-clean: distclean +RUNLEX = ..\..\tools\runlex.sh + +mate_parser_lex.h : mate_parser.c mate_parser.obj : mate_parser.c mate_grammar.h : mate_grammar.c diff --git a/plugins/mate/mate_parser.l b/plugins/mate/mate_parser.l index 8d1089edee..7d99afcf11 100644 --- a/plugins/mate/mate_parser.l +++ b/plugins/mate/mate_parser.l @@ -49,6 +49,7 @@ #include "mate.h" #include "mate_grammar.h" +#include "mate_parser_lex.h" void MateParser(void*,int, gchar*, mate_config* matecfg); void *MateParserAlloc(void *(*)(gulong)); -- cgit v1.2.3