LEX vs FLEX; Was: [PATCH] Basic Ada files

Andrew Cagney
2002-05-24T02:29:39Z

Aidan,

> -# This is used to rebuild ada-lex.c from ada-lex.l. If the program is
> -# not defined, but ada-lex.c is present, compilation will continue,
> -# possibly with a warning.
> -FLEX = flex
> -

> -ada-lex.c: ada-lex.l
> - @if [ "$(FLEX)" ] && $(FLEX) --version >/dev/null 2>&1; then \
> - echo $(FLEX) -Isit $(srcdir)/ada-lex.l ">" ada-lex.c; \
> - $(FLEX) -Isit $(srcdir)/ada-lex.l > ada-lex.c; \
> - elif [ ! -f ada-lex.c -a ! -f $(srcdir)/ada-lex.c ]; then \
> - echo "ada-lex.c missing and flex not available."; \
> - false; \
> - elif [ ! -f ada-lex.c ]; then \
> - echo "Warning: ada-lex.c older than ada-lex.l and flex not available."; \
> - fi

(I note you're not the author of this) I'm not exactly comfortable with
making FLEX a condition of being able to build GDB - while the above
tries to hide it, the dependency still exists. I guess we'll need to
come back to that later.

Anyway, can you just re-post this patch with a separate ChangeLog and
with the patch against CVS (using `cvs diff -u' or `cvs diff -p').

Andrew