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

Commit5da944f

Browse files
committed
Consolidate makefile code for setting top_srcdir, srcdir and VPATH.
Responsibility was formerly split between Makefile.global and pgxs.mk.As a result of commitb58233c, in thePGXS case, these variables were unset while parsing Makefile.global andcallees. Inclusion of Makefile.custom did not work from PGXS, and thesubtle difference seemed like a recipe for future bugs. Back-patch to9.4, where that commit first appeared.
1 parente8e86fb commit5da944f

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

‎src/Makefile.global.in

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,24 @@ VERSION = @PACKAGE_VERSION@
4040
MAJORVERSION = @PG_MAJORVERSION@
4141
VERSION_NUM = @PG_VERSION_NUM@
4242

43-
# Support for VPATH builds
44-
# (PGXS VPATH support is handled separately in pgxs.mk)
45-
ifndefPGXS
43+
# Set top_srcdir, srcdir, and VPATH.
44+
ifdefPGXS
45+
top_srcdir =$(top_builddir)
46+
47+
# If VPATH is set or Makefile is not in current directory we are building
48+
# the extension with VPATH so we set the variable here.
49+
ifdefVPATH
50+
srcdir =$(VPATH)
51+
else
52+
ifeq ($(CURDIR),$(dir$(firstword$(MAKEFILE_LIST))))
53+
srcdir = .
54+
VPATH =
55+
else
56+
srcdir =$(dir$(firstword$(MAKEFILE_LIST)))
57+
VPATH =$(srcdir)
58+
endif
59+
endif
60+
else# not PGXS
4661
vpath_build = @vpath_build@
4762
abs_top_builddir = @abs_top_builddir@
4863
abs_top_srcdir = @abs_top_srcdir@

‎src/makefiles/pgxs.mk

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -62,21 +62,6 @@ ifdef PGXS
6262
top_builddir :=$(dir$(PGXS))../..
6363
include$(top_builddir)/src/Makefile.global
6464

65-
top_srcdir =$(top_builddir)
66-
# If VPATH is set or Makefile is not in current directory we are building
67-
# the extension with VPATH so we set the variable here.
68-
ifdefVPATH
69-
srcdir =$(VPATH)
70-
else
71-
ifeq ($(CURDIR),$(dir$(firstword$(MAKEFILE_LIST))))
72-
srcdir = .
73-
VPATH =
74-
else
75-
srcdir =$(dir$(firstword$(MAKEFILE_LIST)))
76-
VPATH =$(srcdir)
77-
endif
78-
endif
79-
8065
# These might be set in Makefile.global, but if they were not found
8166
# during the build of PostgreSQL, supply default values so that users
8267
# of pgxs can use the variables.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp