aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mate
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2007-08-04 02:13:52 +0000
committerGuy Harris <guy@alum.mit.edu>2007-08-04 02:13:52 +0000
commit5be4499ad19b66e1626f6c6eb1849803e08126d6 (patch)
tree5f15006cef3d366c1ffb3840f5fda428c28ed2ab /plugins/mate
parent2d11b0813e23d01c27975755f39f2457e4da5c90 (diff)
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
Diffstat (limited to 'plugins/mate')
-rw-r--r--plugins/mate/Makefile.am5
-rw-r--r--plugins/mate/Makefile.common1
-rw-r--r--plugins/mate/Makefile.nmake6
-rw-r--r--plugins/mate/mate_parser.l1
4 files changed, 12 insertions, 1 deletions
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));