From 0a1c8723c4cbd8c549f0df0e0aff3d627000123b Mon Sep 17 00:00:00 2001 From: Andres Freund Date: Thu, 11 Feb 2016 10:10:08 +0100 Subject: [PATCH] Fix make install for VPATH builds. copy_to_distributed_table is in the source, not the build directory. As there might be scripts in either at some point, install scripts from both. --- Makefile.global.in | 3 +++ src/backend/distributed/Makefile | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile.global.in b/Makefile.global.in index 60b3d31f0..0aff9236d 100644 --- a/Makefile.global.in +++ b/Makefile.global.in @@ -19,6 +19,9 @@ vpath_build=@vpath_build@ ifeq ($(vpath_build),yes) VPATH:=$(citus_abs_srcdir) USE_VPATH:=$(VPATH) + citus_top_srcdir:=$(citus_abs_top_srcdir) +else + citus_top_srcdir:=$(citus_top_builddir) endif # Citus is built using PostgreSQL's pgxs diff --git a/src/backend/distributed/Makefile b/src/backend/distributed/Makefile index 8f4bd899a..b01a9d01c 100644 --- a/src/backend/distributed/Makefile +++ b/src/backend/distributed/Makefile @@ -7,7 +7,8 @@ MODULE_big = citus EXTENSION = citus EXTVERSION = 5.0 DATA_built = $(EXTENSION)--$(EXTVERSION).sql -SCRIPTS = $(wildcard $(citus_top_builddir)/src/bin/scripts/*) +# Install scripts in build and/or source directory, but only once if those are the same +SCRIPTS = $(sort $(wildcard $(citus_top_builddir)/src/bin/scripts/* $(citus_top_srcdir)/src/bin/scripts/*)) # directories with source files SUBDIRS = . commands executor master planner relay test utils worker