From: Will Estes Date: Wed, 25 Sep 2002 13:39:32 +0000 (+0000) Subject: include a single, automatically generated version number in flex scanners X-Git-Tag: flex-2-5-23~57 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4c942d445bde602e1892b82e68f7a8bfc1c2d65b;p=flex include a single, automatically generated version number in flex scanners --- diff --git a/Makefile.am b/Makefile.am index 7bbeccd..9ac24ff 100644 --- a/Makefile.am +++ b/Makefile.am @@ -127,7 +127,7 @@ INCLUDES = -DLOCALEDIR=\"$(localedir)\" -I@includedir@ -I$(top_srcdir)/intl LIBS = @LIBINTL@ @LIBS@ skel.c: flex.skl mkskel.sh - $(m4) -P $(srcdir)/flex.skl | $(SHELL) $(srcdir)/mkskel.sh >skel.c + $(m4) -P -DVERSION=$(VERSION) $(srcdir)/flex.skl | $(SHELL) $(srcdir)/mkskel.sh >skel.c $(man_MANS): $(srcdir)/main.c for i in $(man_MANS) ; do \ diff --git a/flex.skl b/flex.skl index d583078..9ba57e2 100644 --- a/flex.skl +++ b/flex.skl @@ -1,3 +1,4 @@ +m4_changecom %# -*-C-*- vi: set ft=c: /* A lexical scanner generated by flex */ @@ -5,7 +6,7 @@ %# and affect the generation of the scanner. The possible control codes are %# listed and processed in misc.c. %# -%# %# - A comment. The current line is ommited from the generated scanner. +%# %# - A comment. The current line is omitted from the generated scanner. %# %push - Push the current state of the skel processing %# A push is typically followed by one of the commands below. %# %pop - Pop the state. @@ -29,8 +30,7 @@ %# edit the skeleton. %# #define FLEX_SCANNER -#define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 +#define YY_FLEX_VERSION VERSION /* First, we deal with platform-specific or compiler-specific issues. */ diff --git a/flex.texi b/flex.texi index 5e7894e..38274f5 100644 --- a/flex.texi +++ b/flex.texi @@ -4512,10 +4512,7 @@ ignores them. @item The name @code{FLEX_SCANNER} is @code{#define}'d so scanners may be written for use with either @code{flex} or @code{lex}. Scanners also -include @code{YY_FLEX_MAJOR_VERSION} and @code{YY_FLEX_MINOR_VERSION} -indicating which version of @code{flex} generated the scanner (for -example, for the 2.5 release, these defines would be 2 and 5 -respectively). +include @code{YY_FLEX_VERSION} indicating which version of @code{flex} generated the scanner. @end itemize @cindex POSIX, non-POSIX features of flex