From cdf1c37c4263afa88be73583cde320bb5bc334a4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=A9dric=20Villemain?= <cedric@2ndquadrant.fr>
Date: Sat, 1 Dec 2012 14:59:56 +0100
Subject: [PATCH] Fix extension install

The sharedir/extension/ directory was not created by the Makefile but this is
a required directory (all extension.control files goe sin it).

It works so far because probably that nobody tryed to use MODULEDIR and VPATH
builds together (there is already a target which mkdir the MODULEDIR so that
using the defaults the issue was not visible)
---
 src/makefiles/pgxs.mk |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/makefiles/pgxs.mk b/src/makefiles/pgxs.mk
index 318d5ef..a07af30 100644
--- a/src/makefiles/pgxs.mk
+++ b/src/makefiles/pgxs.mk
@@ -146,6 +146,9 @@ endif # MODULE_big
 
 
 installdirs:
+ifneq (,$(EXTENSION))
+    $(MKDIR_P) '$(DESTDIR)$(datadir)/extension'
+endif
 ifneq (,$(DATA)$(DATA_built))
 	$(MKDIR_P) '$(DESTDIR)$(datadir)/$(datamoduledir)'
 endif
-- 
1.7.10.4

