aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dfilter
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 /epan/dfilter
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 'epan/dfilter')
-rw-r--r--epan/dfilter/Makefile.am10
-rw-r--r--epan/dfilter/Makefile.nmake5
-rw-r--r--epan/dfilter/scanner.l1
3 files changed, 12 insertions, 4 deletions
diff --git a/epan/dfilter/Makefile.am b/epan/dfilter/Makefile.am
index ad45ac4424..50589e2d6f 100644
--- a/epan/dfilter/Makefile.am
+++ b/epan/dfilter/Makefile.am
@@ -44,7 +44,8 @@ DISTCLEANFILES = \
MAINTAINERCLEANFILES = \
Makefile.in \
- scanner.c
+ scanner.c \
+ scanner_lex.h
INCLUDES = -I$(srcdir)/../.. -I$(srcdir)/.. -I$(srcdir)/$(LEMON)
@@ -86,7 +87,8 @@ libdfilter_la_CFLAGS = $(AM_NON_GENERATED_CFLAGS)
libdfilter_generated_la_SOURCES = \
grammar.c \
grammar.h \
- scanner.c
+ scanner.c \
+ scanner_lex.h
libdfilter_la_LIBADD = libdfilter_generated.la
libdfilter_la_DEPENDENCIES = libdfilter_generated.la
@@ -96,7 +98,9 @@ EXTRA_DIST = \
scanner.l \
Makefile.nmake
-scanner.o : scanner.c grammar.h
+RUNLEX=$(top_srcdir)/tools/runlex.sh
+
+scanner_lex.h : scanner.c
LEMON=../../tools/lemon
diff --git a/epan/dfilter/Makefile.nmake b/epan/dfilter/Makefile.nmake
index 3ea7f83037..ed7c50689a 100644
--- a/epan/dfilter/Makefile.nmake
+++ b/epan/dfilter/Makefile.nmake
@@ -58,10 +58,13 @@ clean:
# the same for now.
#
distclean: clean
- rm -f scanner.c grammar.c grammar.h grammar.out
+ rm -f scanner.c scanner_lex.h grammar.c grammar.h grammar.out
maintainer-clean: distclean
+RUNLEX=..\..\tools\runlex.sh
+
+scanner_lex.h : scanner.c
scanner.obj : scanner.c grammar.h
grammar.h : grammar.c
diff --git a/epan/dfilter/scanner.l b/epan/dfilter/scanner.l
index 9dec41e808..2c0d036e29 100644
--- a/epan/dfilter/scanner.l
+++ b/epan/dfilter/scanner.l
@@ -54,6 +54,7 @@
#include "syntax-tree.h"
#include "grammar.h"
#include "dfunctions.h"
+#include "scanner_lex.h"
/*
* GLib 1.2[.x] doesn't define G_MAXINT32 or G_MININT32; if they're not