aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2012-10-09 21:04:06 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2012-10-09 21:04:06 -0400
commit3f88fa971aafcf5204052d1dd114c739a0e751c2 (patch)
treec09718f640d5b61005e86c71434c2700f21cee81 /src
parent7e0cce0265921dca2e8ea9485c194465a7e19703 (diff)
downloadpostgresql-3f88fa971aafcf5204052d1dd114c739a0e751c2.tar.gz
postgresql-3f88fa971aafcf5204052d1dd114c739a0e751c2.zip
Fix PGXS support for building loadable modules on AIX.
Building a shlib on AIX requires use of the mkldexport.sh script, but we failed to install that, preventing its use from non-source-tree contexts. Also, Makefile.aix had the wrong idea about where to find the installed copy of the postgres.imp symbol file used by AIX. Per report from John Pierce. Patch all the way back, since this has been broken since the beginning of PGXS.
Diffstat (limited to 'src')
-rw-r--r--src/backend/Makefile3
-rw-r--r--src/makefiles/Makefile.aix5
2 files changed, 6 insertions, 2 deletions
diff --git a/src/backend/Makefile b/src/backend/Makefile
index 119f7aff89d..5e30aab3ef4 100644
--- a/src/backend/Makefile
+++ b/src/backend/Makefile
@@ -235,6 +235,7 @@ else
endif
ifeq ($(MAKE_EXPORTS), true)
$(INSTALL_DATA) $(POSTGRES_IMP) '$(DESTDIR)$(pkglibdir)/$(POSTGRES_IMP)'
+ $(INSTALL_PROGRAM) $(MKLDEXPORT) '$(DESTDIR)$(pgxsdir)/$(MKLDEXPORT_DIR)/mkldexport.sh'
endif
.PHONY: install-bin
@@ -253,6 +254,7 @@ endif
endif
ifeq ($(MAKE_EXPORTS), true)
$(MKDIR_P) '$(DESTDIR)$(pkglibdir)'
+ $(MKDIR_P) '$(DESTDIR)$(pgxsdir)/$(MKLDEXPORT_DIR)'
endif
@@ -262,6 +264,7 @@ uninstall:
rm -f '$(DESTDIR)$(bindir)/postgres$(X)' '$(DESTDIR)$(bindir)/postmaster'
ifeq ($(MAKE_EXPORTS), true)
rm -f '$(DESTDIR)$(pkglibdir)/$(POSTGRES_IMP)'
+ rm -f '$(DESTDIR)$(pgxsdir)/$(MKLDEXPORT_DIR)/mkldexport.sh'
endif
ifeq ($(PORTNAME), cygwin)
ifeq ($(MAKE_DLL), true)
diff --git a/src/makefiles/Makefile.aix b/src/makefiles/Makefile.aix
index fc759ec082d..e5ad89d1470 100644
--- a/src/makefiles/Makefile.aix
+++ b/src/makefiles/Makefile.aix
@@ -27,12 +27,13 @@ endif
POSTGRES_IMP= postgres.imp
ifdef PGXS
-BE_DLLLIBS= -Wl,-bI:$(bindir)/postgres/$(POSTGRES_IMP)
+BE_DLLLIBS= -Wl,-bI:$(pkglibdir)/$(POSTGRES_IMP)
else
BE_DLLLIBS= -Wl,-bI:$(top_builddir)/src/backend/$(POSTGRES_IMP)
endif
-MKLDEXPORT=$(top_srcdir)/src/backend/port/aix/mkldexport.sh
+MKLDEXPORT_DIR=src/backend/port/aix
+MKLDEXPORT=$(top_srcdir)/$(MKLDEXPORT_DIR)/mkldexport.sh
%.exp: %.o
$(MKLDEXPORT) $^ >$@