Not sure why this hasn't been reported before; perhaps it is not needed
with newer gcc versions, but it definitely fails here.
REFDOCDIR= $(top_srcdir)/doc/src/sgml/ref
-override CPPFLAGS := -DFRONTEND -I$(libpq_srcdir) $(CPPFLAGS)
+override CPPFLAGS := -DFRONTEND -I$(srcdir) -I$(libpq_srcdir) $(CPPFLAGS)
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 \