Skip to content

Commit 49440ff

Browse files
committed
Install plpgsql.h to to include/server at "make install".
The header file is needed by any module that wants to use the PL/pgSQL instrumentation plugin interface. Most notably, the pldebugger plugin needs this. With this patch, it can be built using pgxs, without having the full server source tree available.
1 parent 0f48e06 commit 49440ff

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

src/pl/plpgsql/src/Makefile

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,28 @@ all: all-lib
2727
include $(top_srcdir)/src/Makefile.shlib
2828

2929

30-
install: all install-lib install-data
30+
install: all install-lib install-data install-headers
3131

3232
installdirs: installdirs-lib
3333
$(MKDIR_P) '$(DESTDIR)$(datadir)/extension'
34+
$(MKDIR_P) '$(DESTDIR)$(includedir_server)'
3435

35-
uninstall: uninstall-lib uninstall-data
36+
uninstall: uninstall-lib uninstall-data uninstall-headers
3637

3738
install-data: installdirs
3839
$(INSTALL_DATA) $(addprefix $(srcdir)/, $(DATA)) '$(DESTDIR)$(datadir)/extension/'
3940

41+
# The plpgsql.h header file is needed by instrumentation plugins
42+
install-headers: installdirs
43+
$(INSTALL_DATA) '$(srcdir)/plpgsql.h' '$(DESTDIR)$(includedir_server)'
44+
4045
uninstall-data:
4146
rm -f $(addprefix '$(DESTDIR)$(datadir)/extension'/, $(notdir $(DATA)))
4247

43-
.PHONY: install-data uninstall-data
48+
uninstall-headers:
49+
rm -f '$(DESTDIR)$(includedir_server)/plpgsql.h'
50+
51+
.PHONY: install-data install-headers uninstall-data uninstall-headers
4452

4553

4654
# Force these dependencies to be known even without dependency info built:

src/tools/msvc/Install.pm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,8 @@ sub CopyIncludeFiles
501501
my $D;
502502
opendir($D, 'src/include') || croak "Could not opendir on src/include!\n";
503503

504+
CopyFiles('PL/pgSQL header', $target . '/include/server/','src/pl/plpgsql/src/', 'plpgsql.h');
505+
504506
# some xcopy progs don't like mixed slash style paths
505507
(my $ctarget = $target) =~ s!/!\\!g;
506508
while (my $d = readdir($D))

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy