aboutsummaryrefslogtreecommitdiff
path: root/src/backend
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/parser/Makefile5
-rw-r--r--src/backend/parser/scan.l3
2 files changed, 6 insertions, 2 deletions
diff --git a/src/backend/parser/Makefile b/src/backend/parser/Makefile
index 665250b9e76..0bdb3249a2e 100644
--- a/src/backend/parser/Makefile
+++ b/src/backend/parser/Makefile
@@ -17,7 +17,7 @@ OBJS= analyze.o gram.o keywords.o kwlookup.o parser.o \
parse_expr.o parse_func.o parse_node.o parse_oper.o parse_param.o \
parse_relation.o parse_target.o parse_type.o parse_utilcmd.o scansup.o
-FLEXFLAGS = -CF
+FLEXFLAGS = -CF -b -p -p
include $(top_srcdir)/src/backend/common.mk
@@ -51,6 +51,7 @@ endif
scan.c: scan.l
ifdef FLEX
$(FLEX) $(FLEXFLAGS) -o'$@' $<
+ @if [ `wc -l <lex.backup` -eq 1 ]; then rm lex.backup; else echo "Scanner requires backup, see lex.backup."; exit 1; fi
else
@$(missing) flex $< $@
endif
@@ -62,3 +63,5 @@ gram.o keywords.o parser.o: gram.h
# gram.c, gram.h, and scan.c are in the distribution tarball, so they
# are not cleaned here.
+clean distclean maintainer-clean:
+ rm -f lex.backup
diff --git a/src/backend/parser/scan.l b/src/backend/parser/scan.l
index 4f9af543d68..12db1900a0b 100644
--- a/src/backend/parser/scan.l
+++ b/src/backend/parser/scan.l
@@ -17,7 +17,8 @@
* for handling float numbers and continued string literals. If you change
* the lexical rules, verify that you haven't broken the no-backtrack
* property by running flex with the "-b" option and checking that the
- * resulting "lex.backup" file says that no backing up is needed.
+ * resulting "lex.backup" file says that no backing up is needed. (As of
+ * Postgres 9.2, this check is made automatically by the Makefile.)
*
*
* Portions Copyright (c) 1996-2011, PostgreSQL Global Development Group