1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-14 18:42:34 +03:00

Fix PGXS vpath build when PostgreSQL is built with vpath

PGXS computes srcdir from VPATH, PostgreSQL proper computes VPATH from
srcdir, and doing both results in an error from make.  Conditionalize so
only one of these takes effect.
This commit is contained in:
Peter Eisentraut
2014-12-04 17:02:02 -05:00
parent e907997f42
commit f3d7077dad

View File

@ -40,6 +40,8 @@ VERSION = @PACKAGE_VERSION@
MAJORVERSION = @PG_MAJORVERSION@
# Support for VPATH builds
# (PGXS VPATH support is handled separately in pgxs.mk)
ifndef PGXS
vpath_build = @vpath_build@
abs_top_srcdir = @abs_top_srcdir@
@ -51,6 +53,7 @@ top_srcdir = $(abs_top_srcdir)
srcdir = $(top_srcdir)/$(subdir)
VPATH = $(srcdir)
endif
endif # not PGXS
vpathsearch = `for f in $(addsuffix /$(1),$(subst :, ,. $(VPATH))); do test -r $$f && echo $$f && break; done`