50 lines
2.2 KiB
Diff
50 lines
2.2 KiB
Diff
From: Jakub Jirutka <jakub@jirutka.cz>
|
|
Date: Mon, 08 Nov 2021 14:56:33 +0100
|
|
Subject: [PATCH] Allow to install interfaces headers and server headers separately
|
|
|
|
Don't install headers of the interfaces (libpq and libecpg) by the install
|
|
target, allow to install them separately from the headers needed for server.
|
|
We need this for two reasons:
|
|
|
|
a. Allow building PostgreSQL server with LDAP support, but libpq without
|
|
dependency on LDAP.
|
|
b. Allow building/installing PostgreSQL server without the interfaces.
|
|
This is used for non-default postgresql aports (older versions of
|
|
PostgreSQL) - we want to provide just one version of libpq and libecpg
|
|
library provided by the default (newest) postgresql aport.
|
|
|
|
--- a/src/include/Makefile
|
|
+++ b/src/include/Makefile
|
|
@@ -26,8 +26,10 @@
|
|
port/win32_msvc/sys port/win32/arpa port/win32/netinet \
|
|
port/win32/sys portability
|
|
|
|
-# Install all headers
|
|
-install: all installdirs
|
|
+# Install server headers
|
|
+install: install-server
|
|
+install-interfaces: all
|
|
+ $(MKDIR_P) '$(DESTDIR)$(includedir)/libpq' '$(DESTDIR)$(includedir_internal)/libpq'
|
|
# These headers are needed by the public headers of the interfaces.
|
|
$(INSTALL_DATA) $(srcdir)/postgres_ext.h '$(DESTDIR)$(includedir)'
|
|
$(INSTALL_DATA) $(srcdir)/libpq/libpq-fs.h '$(DESTDIR)$(includedir)/libpq'
|
|
@@ -40,6 +42,8 @@
|
|
$(INSTALL_DATA) $(srcdir)/port.h '$(DESTDIR)$(includedir_internal)'
|
|
$(INSTALL_DATA) $(srcdir)/postgres_fe.h '$(DESTDIR)$(includedir_internal)'
|
|
$(INSTALL_DATA) $(srcdir)/libpq/pqcomm.h '$(DESTDIR)$(includedir_internal)/libpq'
|
|
+install-server: all
|
|
+ $(MKDIR_P) $(addprefix '$(DESTDIR)$(includedir_server)'/, $(SUBDIRS))
|
|
# These headers are needed for server-side development
|
|
$(INSTALL_DATA) pg_config.h '$(DESTDIR)$(includedir_server)'
|
|
$(INSTALL_DATA) pg_config_ext.h '$(DESTDIR)$(includedir_server)'
|
|
@@ -64,10 +68,6 @@
|
|
chmod $(INSTALL_DATA_MODE) *.h || exit; \
|
|
done
|
|
|
|
-installdirs:
|
|
- $(MKDIR_P) '$(DESTDIR)$(includedir)/libpq' '$(DESTDIR)$(includedir_internal)/libpq'
|
|
- $(MKDIR_P) $(addprefix '$(DESTDIR)$(includedir_server)'/, $(SUBDIRS))
|
|
-
|
|
|
|
uninstall:
|
|
rm -f $(addprefix '$(DESTDIR)$(includedir)'/, pg_config.h pg_config_ext.h pg_config_os.h pg_config_manual.h postgres_ext.h libpq/libpq-fs.h)
|