the attached patch fix the extension installation using a VPATH when a 
MODULEDIR is defined in the extension Makefile.

The current issue is that the sharedir/extension directory is not created if 
MODULEDIR != 'extension' i.e. MODULEDIR is defined in the Makefile. Thus 'make 
install' fail to copy the control file in an nonexistent directory.

Tested with debian extension packages.
-- 
Cédric Villemain +33 (0)6 20 30 22 52
http://2ndQuadrant.fr/
PostgreSQL: Support 24x7 - Développement, Expertise et Formation
From cdf1c37c4263afa88be73583cde320bb5bc334a4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=A9dric=20Villemain?= <ced...@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

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to