diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2012-10-11 06:57:04 -0400 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2012-10-11 06:57:04 -0400 |
commit | 8521d131941be5a177270bc428fa8e684cd645b5 (patch) | |
tree | bfbf285859f3770aedc6b3c674a45d45cc4be5fe /src/bin/psql | |
parent | ab112068b657a2bd30a7f953c732e2ee75a606f5 (diff) | |
download | postgresql-8521d131941be5a177270bc428fa8e684cd645b5.tar.gz postgresql-8521d131941be5a177270bc428fa8e684cd645b5.zip |
Refactor flex and bison make rules
Numerous flex and bison make rules have appeared in the source tree
over time, and they are all virtually identical, so we can replace
them by pattern rules with some variables for customization.
Users of pgxs will also be able to benefit from this.
Diffstat (limited to 'src/bin/psql')
-rw-r--r-- | src/bin/psql/Makefile | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/bin/psql/Makefile b/src/bin/psql/Makefile index 771fd712e46..9a6776ae83a 100644 --- a/src/bin/psql/Makefile +++ b/src/bin/psql/Makefile @@ -26,8 +26,6 @@ OBJS= command.o common.o help.o input.o stringutils.o mainloop.o copy.o \ sql_help.o \ $(WIN32RES) -FLEXFLAGS = -Cfe -b -p -p - all: psql @@ -49,13 +47,8 @@ sql_help.h: create_help.pl $(wildcard $(REFDOCDIR)/*.sgml) # psqlscan is compiled as part of mainloop mainloop.o: psqlscan.c -psqlscan.c: psqlscan.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 +psqlscan.c: FLEXFLAGS = -Cfe -p -p +psqlscan.c: FLEX_NO_BACKUP=yes distprep: sql_help.h psqlscan.c |