File tree 3 files changed +9
-4
lines changed 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ OBJS= analyze.o gram.o keywords.o kwlookup.o parser.o \
17
17
parse_expr.o parse_func.o parse_node.o parse_oper.o parse_param.o \
18
18
parse_relation.o parse_target.o parse_type.o parse_utilcmd.o scansup.o
19
19
20
- FLEXFLAGS = -CF
20
+ FLEXFLAGS = -CF -b -p -p
21
21
22
22
include $(top_srcdir ) /src/backend/common.mk
23
23
51
51
scan.c : scan.l
52
52
ifdef FLEX
53
53
$(FLEX) $(FLEXFLAGS) -o'$@' $<
54
+ @if [ `wc -l <lex.backup` -eq 1 ]; then rm lex.backup; else echo "Scanner requires backup, see lex.backup."; exit 1; fi
54
55
else
55
56
@$(missing) flex $< $@
56
57
endif
@@ -62,3 +63,5 @@ gram.o keywords.o parser.o: gram.h
62
63
63
64
# gram.c, gram.h, and scan.c are in the distribution tarball, so they
64
65
# are not cleaned here.
66
+ clean distclean maintainer-clean :
67
+ rm -f lex.backup
Original file line number Diff line number Diff line change 17
17
* for handling float numbers and continued string literals. If you change
18
18
* the lexical rules, verify that you haven't broken the no-backtrack
19
19
* property by running flex with the "-b" option and checking that the
20
- * resulting "lex.backup" file says that no backing up is needed.
20
+ * resulting "lex.backup" file says that no backing up is needed. (As of
21
+ * Postgres 9.2, this check is made automatically by the Makefile.)
21
22
*
22
23
*
23
24
* Portions Copyright (c) 1996-2011, PostgreSQL Global Development Group
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ OBJS= command.o common.o help.o input.o stringutils.o mainloop.o copy.o \
26
26
sql_help.o \
27
27
$(WIN32RES )
28
28
29
- FLEXFLAGS = -Cfe
29
+ FLEXFLAGS = -Cfe -b -p -p
30
30
31
31
32
32
all : psql
@@ -52,6 +52,7 @@ mainloop.o: psqlscan.c
52
52
psqlscan.c : psqlscan.l
53
53
ifdef FLEX
54
54
$(FLEX) $(FLEXFLAGS) -o'$@' $<
55
+ @if [ `wc -l <lex.backup` -eq 1 ]; then rm lex.backup; else echo "Scanner requires backup, see lex.backup."; exit 1; fi
55
56
else
56
57
@$(missing) flex $< $@
57
58
endif
@@ -70,7 +71,7 @@ uninstall:
70
71
71
72
# psqlscan.c is in the distribution tarball, so is not cleaned here
72
73
clean distclean :
73
- rm -f psql$(X ) $(OBJS ) dumputils.c keywords.c kwlookup.c
74
+ rm -f psql$(X ) $(OBJS ) dumputils.c keywords.c kwlookup.c lex.backup
74
75
75
76
maintainer-clean : distclean
76
77
rm -f sql_help.h sql_help.c psqlscan.c
You can’t perform that action at this time.
0 commit comments