Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1e95bbc

Browse files
committed
Fix SHLIB_PREREQS use in contrib, allowing PGXS builds
dblink and postgres_fdw use SHLIB_PREREQS = submake-libpq to build libpqfirst. This doesn't work in a PGXS build, because there is no libpq tobuild. So just omit setting SHLIB_PREREQS in this case.Note that PGXS users can still use SHLIB_PREREQS (although it is notdocumented). The problem here is only that contrib modules can be builtin-tree or using PGXS, and the prerequisite is only applicable in theformer case.Commit6697aa2 previously attempted toaddress this by creating a somewhat fake submake-libpq target inMakefile.global. That was not the right fix, and it was also done in anonportable way, so revert that.
1 parente86507d commit1e95bbc

File tree

3 files changed

+3
-13
lines changed

3 files changed

+3
-13
lines changed

‎contrib/dblink/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ MODULE_big = dblink
44
OBJS= dblink.o$(WIN32RES)
55
PG_CPPFLAGS = -I$(libpq_srcdir)
66
SHLIB_LINK =$(libpq)
7-
SHLIB_PREREQS = submake-libpq
87

98
EXTENSION = dblink
109
DATA = dblink--1.1.sql dblink--1.0--1.1.sql dblink--unpackaged--1.0.sql
@@ -19,6 +18,7 @@ PG_CONFIG = pg_config
1918
PGXS :=$(shell$(PG_CONFIG) --pgxs)
2019
include$(PGXS)
2120
else
21+
SHLIB_PREREQS = submake-libpq
2222
subdir = contrib/dblink
2323
top_builddir = ../..
2424
include$(top_builddir)/src/Makefile.global

‎contrib/postgres_fdw/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ PGFILEDESC = "postgres_fdw - foreign data wrapper for PostgreSQL"
66

77
PG_CPPFLAGS = -I$(libpq_srcdir)
88
SHLIB_LINK =$(libpq)
9-
SHLIB_PREREQS = submake-libpq
109

1110
EXTENSION = postgres_fdw
1211
DATA = postgres_fdw--1.0.sql
@@ -18,6 +17,7 @@ PG_CONFIG = pg_config
1817
PGXS :=$(shell$(PG_CONFIG) --pgxs)
1918
include$(PGXS)
2019
else
20+
SHLIB_PREREQS = submake-libpq
2121
subdir = contrib/postgres_fdw
2222
top_builddir = ../..
2323
include$(top_builddir)/src/Makefile.global

‎src/Makefile.global.in

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -458,23 +458,13 @@ ifeq ($(PORTNAME),cygwin)
458458
libpq_pgport +=$(LDAP_LIBS_FE)
459459
endif
460460

461-
# If PGXS is not defined, build libpq and libpgport dependencies as required.
462-
# If the build is with PGXS, then these are supposed to be already built and
463-
# installed, and we just ensure that the expected files exist.
464-
ifndefPGXS
461+
465462
submake-libpq:
466463
$(MAKE) -C$(libpq_builddir) all
467-
else
468-
submake-libpq:$(libdir)/libpq.so ;
469-
endif
470464

471-
ifndefPGXS
472465
submake-libpgport:
473466
$(MAKE) -C$(top_builddir)/src/port all
474467
$(MAKE) -C$(top_builddir)/src/common all
475-
else
476-
submake-libpgport:$(libdir)/libpgport.a$(libdir)/libpgcommon.a ;
477-
endif
478468

479469
.PHONY: submake-libpq submake-libpgport
480470

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp