Add error pattern checks for some TAP tests for non-existing objects
[pgsql.git] / src / bin / psql / Makefile
blob5b1545d9948adee3e1fa953bf83e31f4b4e88eae
1 #-------------------------------------------------------------------------
3 # Makefile for src/bin/psql
5 # Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
6 # Portions Copyright (c) 1994, Regents of the University of California
8 # src/bin/psql/Makefile
10 #-------------------------------------------------------------------------
12 PGFILEDESC = "psql - the PostgreSQL interactive terminal"
13 PGAPPICON=win32
15 subdir = src/bin/psql
16 top_builddir = ../../..
17 include $(top_builddir)/src/Makefile.global
19 # make this available to TAP test scripts
20 export with_readline
22 REFDOCDIR= $(top_srcdir)/doc/src/sgml/ref
24 override CPPFLAGS := -I. -I$(srcdir) -I$(libpq_srcdir) $(CPPFLAGS)
25 LDFLAGS_INTERNAL += -L$(top_builddir)/src/fe_utils -lpgfeutils $(libpq_pgport)
27 OBJS = \
28 $(WIN32RES) \
29 command.o \
30 common.o \
31 copy.o \
32 crosstabview.o \
33 describe.o \
34 help.o \
35 input.o \
36 large_obj.o \
37 mainloop.o \
38 prompt.o \
39 psqlscanslash.o \
40 sql_help.o \
41 startup.o \
42 stringutils.o \
43 tab-complete.o \
44 variables.o
47 all: psql
49 psql: $(OBJS) | submake-libpq submake-libpgport submake-libpgfeutils
50 $(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
52 help.o: sql_help.h
54 # See notes in src/backend/parser/Makefile about the following two rules
55 sql_help.c: sql_help.h
56 touch $@
58 sql_help.h: create_help.pl $(wildcard $(REFDOCDIR)/*.sgml)
59 $(PERL) $< --docdir $(REFDOCDIR) --basename $*
61 psqlscanslash.c: FLEXFLAGS = -Cfe -p -p
62 psqlscanslash.c: FLEX_NO_BACKUP=yes
64 tab-complete.c: gen_tabcomplete.pl tab-complete.in.c
65 $(PERL) $^ --outfile $@
67 install: all installdirs
68 $(INSTALL_PROGRAM) psql$(X) '$(DESTDIR)$(bindir)/psql$(X)'
69 $(INSTALL_DATA) $(srcdir)/psqlrc.sample '$(DESTDIR)$(datadir)/psqlrc.sample'
71 installdirs:
72 $(MKDIR_P) '$(DESTDIR)$(bindir)' '$(DESTDIR)$(datadir)'
74 uninstall:
75 rm -f '$(DESTDIR)$(bindir)/psql$(X)' '$(DESTDIR)$(datadir)/psqlrc.sample'
77 clean distclean:
78 rm -f psql$(X) $(OBJS) lex.backup
79 rm -rf tmp_check
80 rm -f sql_help.h sql_help.c psqlscanslash.c tab-complete.c
82 check:
83 $(prove_check)
85 installcheck:
86 $(prove_installcheck)