projects/aports·blob master · refs

50 lines · 2.2 KiB

1From: Jakub Jirutka <[email protected]>
2Date: Mon, 08 Nov 2021 14:56:33 +0100
3Subject: [PATCH] Allow to install interfaces headers and server headers separately
4
5Don't install headers of the interfaces (libpq and libecpg) by the install
6target, allow to install them separately from the headers needed for server.
7We need this for two reasons:
8
9a. Allow building PostgreSQL server with LDAP support, but libpq without
10 dependency on LDAP.
11b. Allow building/installing PostgreSQL server without the interfaces.
12 This is used for non-default postgresql aports (older versions of
13 PostgreSQL) - we want to provide just one version of libpq and libecpg
14 library provided by the default (newest) postgresql aport.
15
16--- a/src/include/Makefile
17+++ b/src/include/Makefile
18@@ -26,8 +26,10 @@
19 port/win32_msvc/sys port/win32/arpa port/win32/netinet \
20 port/win32/sys portability
21
22-# Install all headers
23-install: all installdirs
24+# Install server headers
25+install: install-server
26+install-interfaces: all
27+ $(MKDIR_P) '$(DESTDIR)$(includedir)/libpq' '$(DESTDIR)$(includedir_internal)/libpq'
28 # These headers are needed by the public headers of the interfaces.
29 $(INSTALL_DATA) $(srcdir)/postgres_ext.h '$(DESTDIR)$(includedir)'
30 $(INSTALL_DATA) $(srcdir)/libpq/libpq-fs.h '$(DESTDIR)$(includedir)/libpq'
31@@ -41,6 +43,8 @@
32 $(INSTALL_DATA) $(srcdir)/postgres_fe.h '$(DESTDIR)$(includedir_internal)'
33 $(INSTALL_DATA) $(srcdir)/libpq/pqcomm.h '$(DESTDIR)$(includedir_internal)/libpq'
34 $(INSTALL_DATA) $(srcdir)/libpq/protocol.h '$(DESTDIR)$(includedir_internal)/libpq'
35+install-server: all
36+ $(MKDIR_P) $(addprefix '$(DESTDIR)$(includedir_server)'/, $(SUBDIRS))
37 # These headers are needed for server-side development
38 $(INSTALL_DATA) pg_config.h '$(DESTDIR)$(includedir_server)'
39 $(INSTALL_DATA) pg_config_ext.h '$(DESTDIR)$(includedir_server)'
40@@ -60,10 +64,6 @@
41 endif
42 $(MAKE) -C catalog install
43
44-installdirs:
45- $(MKDIR_P) '$(DESTDIR)$(includedir)/libpq' '$(DESTDIR)$(includedir_internal)/libpq'
46- $(MKDIR_P) $(addprefix '$(DESTDIR)$(includedir_server)'/, $(SUBDIRS))
47-
48
49 uninstall:
50 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)