[commit] Fix flex options
Paul Hilfinger
hilfingr@gnat.com
Sun Oct 3 08:40:00 GMT 2004
It seems that a change to more recent versions of flex has altered
command-line option processing in an incompatible way ('-Isit' is now
illegal). This obvious change moves most options into the .l file,
removing them from the command line, fixing the problem and placing
the options where they really belong.
Paul Hilfinger
2004-10-03 Paul Hilfinger <hilfingr@nile.gnat.com>
* Makefile.in (.l.c): Modify rule for compatibility with recent
versions of flex, and remove most command-line options.
* ada-lex.l: Add %options line in place of -I -i and -s command-line
options.
Index: gdb/ada-lex.l
===================================================================
RCS file: /cvs/src/src/gdb/ada-lex.l,v
retrieving revision 1.7
diff -u -p -r1.7 ada-lex.l
--- gdb/ada-lex.l 18 Sep 2004 22:23:23 -0000 1.7
+++ gdb/ada-lex.l 3 Oct 2004 08:28:23 -0000
@@ -26,9 +26,6 @@ Foundation, Inc., 675 Mass Ave, Cambridg
/* each successive token and places a semantic value into yylval */
/* (ada-lval), defined by the parser. */
-/* Run flex with (at least) the -i option (case-insensitive), and the -I */
-/* option (interactive---no unnecessary lookahead). */
-
DIG [0-9]
NUM10 ({DIG}({DIG}|_)*)
HEXDIG [0-9a-f]
@@ -89,6 +86,8 @@ static int find_dot_all (const char *);
%}
+%option case-insensitive interactive nodefault
+
%s IN_STRING BEFORE_QUAL_QUOTE
%%
Index: gdb/Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.636
diff -u -p -r1.636 Makefile.in
--- gdb/Makefile.in 2 Oct 2004 09:55:14 -0000 1.636
+++ gdb/Makefile.in 3 Oct 2004 08:28:24 -0000
@@ -1583,8 +1583,8 @@ po/$(PACKAGE).pot: force
mv $@.new ./$*.c
.l.c:
@if [ "$(FLEX)" ] && $(FLEX) --version >/dev/null 2>&1; then \
- echo $(FLEX) -Isit $< ">" $@; \
- $(FLEX) -Isit $< > $@; \
+ echo $(FLEX) -o$@ $<; \
+ $(FLEX) -o$@ $<; \
elif [ ! -f $@ -a ! -f $< ]; then \
echo "$< missing and flex not available."; \
false; \
More information about the Gdb-patches
mailing list