From 3d3f4df6792c0e98b0a915b8704504f27738bf26 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=A9dric=20Villemain?= <cedric@2ndquadrant.fr>
Date: Tue, 28 May 2013 14:17:04 +0200
Subject: [PATCH 2/6] Create data directory if extension when required

There is a hack to link the regression data files from the srcdir
to the builddir when doing 'make VPATH'. but it failed when used in
conjunction with USE_PGXS and out-of-tree build of an extension.

Issue is the absence of the data/ directory in the builddir.
---
 src/makefiles/pgxs.mk |    1 +
 1 file changed, 1 insertion(+)

diff --git a/src/makefiles/pgxs.mk b/src/makefiles/pgxs.mk
index bbcfe04..6a19b0f 100644
--- a/src/makefiles/pgxs.mk
+++ b/src/makefiles/pgxs.mk
@@ -263,6 +263,7 @@ test_files_build := $(patsubst $(srcdir)/%, $(abs_builddir)/%, $(test_files_src)
 
 all: $(test_files_build)
 $(test_files_build): $(abs_builddir)/%: $(srcdir)/%
+	$(MKDIR_P) $(dir $@)
 	ln -s $< $@
 endif # VPATH
 
-- 
1.7.10.4

