summaryrefslogtreecommitdiff
path: root/src/bin/psql
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2016-03-23 20:22:08 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2016-03-23 20:22:08 -0400
commit2c6af4f44228d76d3351fe26f68b00b55cdd239a (patch)
tree6a5ce32658ba9ad51ea05d6f46ef0aaf44b1f244 /src/bin/psql
parent3df9c374e279db37b00cd9c86219471d0cdaa97c (diff)
Move keywords.c/kwlookup.c into src/common/.
Now that we have src/common/ for code shared between frontend and backend, we can get rid of (most of) the klugy ways that the keyword table and keyword lookup code were formerly shared between different uses. This is a first step towards a more general plan of getting rid of special-purpose kluges for sharing code in src/bin/. I chose to merge kwlookup.c back into keywords.c, as it once was, and always has been so far as keywords.h is concerned. We could have kept them separate, but there is noplace that uses ScanKeywordLookup without also wanting access to the backend's keyword list, so there seems little point. ecpg is still a bit weird, but at least now the trickiness is documented. I think that the MSVC build script should require no adjustments beyond what's done here ... but we'll soon find out.
Diffstat (limited to 'src/bin/psql')
-rw-r--r--src/bin/psql/.gitignore2
-rw-r--r--src/bin/psql/Makefile9
2 files changed, 3 insertions, 8 deletions
diff --git a/src/bin/psql/.gitignore b/src/bin/psql/.gitignore
index dc88807f52e..ce881f45ad2 100644
--- a/src/bin/psql/.gitignore
+++ b/src/bin/psql/.gitignore
@@ -3,7 +3,5 @@
/sql_help.h
/sql_help.c
/dumputils.c
-/keywords.c
-/kwlookup.c
/psql
diff --git a/src/bin/psql/Makefile b/src/bin/psql/Makefile
index 5f4038e2cb6..75a9b395b4a 100644
--- a/src/bin/psql/Makefile
+++ b/src/bin/psql/Makefile
@@ -22,7 +22,7 @@ override CPPFLAGS := -I. -I$(srcdir) -I$(libpq_srcdir) -I$(top_srcdir)/src/bin/p
OBJS= command.o common.o help.o input.o stringutils.o mainloop.o copy.o \
startup.o prompt.o variables.o large_obj.o print.o describe.o \
- tab-complete.o mbprint.o dumputils.o keywords.o kwlookup.o \
+ tab-complete.o mbprint.o dumputils.o \
sql_help.o psqlscan.o psqlscanslash.o \
$(WIN32RES)
@@ -34,10 +34,7 @@ psql: $(OBJS) | submake-libpq submake-libpgport
help.o: sql_help.h
-dumputils.c keywords.c: % : $(top_srcdir)/src/bin/pg_dump/%
- rm -f $@ && $(LN_S) $< .
-
-kwlookup.c: % : $(top_srcdir)/src/backend/parser/%
+dumputils.c: % : $(top_srcdir)/src/bin/pg_dump/%
rm -f $@ && $(LN_S) $< .
sql_help.c: sql_help.h ;
@@ -70,7 +67,7 @@ uninstall:
rm -f '$(DESTDIR)$(bindir)/psql$(X)' '$(DESTDIR)$(datadir)/psqlrc.sample'
clean distclean:
- rm -f psql$(X) $(OBJS) dumputils.c keywords.c kwlookup.c lex.backup
+ rm -f psql$(X) $(OBJS) dumputils.c lex.backup
# files removed here are supposed to be in the distribution tarball,
# so do not clean them in the clean/distclean rules