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

Commit31f1f0b

Browse files
committed
Put back parallel-safety guards in plpython and src/test/regress/.
I'd hoped that commit3b8f6e7 was sufficient to ensure parallel safetyeven when a build started in a subdirectory requires rebuilding ofgenerated headers. This isn't so, because making submake-generated-headersa prerequisite of "all" isn't enough to ensure it's completed beforestarting on "all"'s other prerequisites. The explicit dependencies we puton the recursive make targets ensure safe ordering before we recurse intochild directories, but they don't protect targets to be made in the currentdirectory. Hence, put back some ordering dependencies in directories thatwe've traditionally expected to be starting points for "standalone" builds,to wit src/pl/plpython and src/test/regress. (The former needs this inorder to minimize the work involved in building for both python 2 andpython 3; the latter to support packagings that make the regression testsavailable for out-of-build-tree execution.) Adjust some other dependenciesso that these two cases work correctly even at high -j settings.I'm not terribly happy with this partial solution, but I don't see away to do better without massive makefile restructuring, which we surelyaren't doing at this point in the development cycle. In any case, it'slittle if any worse than what we had in prior releases.Discussion:https://postgr.es/m/1523353963.8169.26.camel@gunduz.org
1 parent15a8f8c commit31f1f0b

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

‎src/Makefile.global.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -563,11 +563,11 @@ endif
563563
submake-libpq:
564564
$(MAKE) -C$(libpq_builddir) all
565565

566-
submake-libpgport:
566+
submake-libpgport: | submake-generated-headers
567567
$(MAKE) -C$(top_builddir)/src/port all
568568
$(MAKE) -C$(top_builddir)/src/common all
569569

570-
submake-libpgfeutils:
570+
submake-libpgfeutils: | submake-generated-headers
571571
$(MAKE) -C$(top_builddir)/src/port all
572572
$(MAKE) -C$(top_builddir)/src/common all
573573
$(MAKE) -C$(top_builddir)/src/fe_utils all

‎src/pl/plpython/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ include $(top_srcdir)/src/Makefile.shlib
9999

100100
all: all-lib
101101

102+
# Ensure parallel safety if a build is started in this directory
103+
$(OBJS): | submake-generated-headers
104+
102105
install: all install-lib install-data
103106

104107
installdirs: installdirs-lib

‎src/test/regress/GNUmakefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ pg_regress$(X): pg_regress.o pg_regress_main.o $(WIN32RES) | submake-libpgport
4343
pg_regress.o: pg_regress.c$(top_builddir)/src/port/pg_config_paths.h
4444
pg_regress.o: override CPPFLAGS += -I$(top_builddir)/src/port$(EXTRADEFS)
4545

46-
$(top_builddir)/src/port/pg_config_paths.h:$(top_builddir)/src/Makefile.global
46+
# note: because of the submake dependency, this rule's action is really a no-op
47+
$(top_builddir)/src/port/pg_config_paths.h: | submake-libpgport
4748
$(MAKE) -C$(top_builddir)/src/port pg_config_paths.h
4849

4950
install: all installdirs
@@ -65,6 +66,9 @@ include $(top_srcdir)/src/Makefile.shlib
6566

6667
all: all-lib
6768

69+
# Ensure parallel safety if a build is started in this directory
70+
$(OBJS): | submake-libpgport submake-generated-headers
71+
6872
# Test input and expected files. These are created by pg_regress itself, so we
6973
# don't have a rule to create them. We do need rules to clean them however.
7074
input_files =$(patsubst$(srcdir)/input/%.source,sql/%.sql,$(wildcard$(srcdir)/input/*.source))
@@ -105,7 +109,7 @@ $(top_builddir)/contrib/spi/refint$(DLSUFFIX): | submake-contrib-spi ;
105109

106110
$(top_builddir)/contrib/spi/autoinc$(DLSUFFIX): | submake-contrib-spi ;
107111

108-
submake-contrib-spi: | submake-libpgport
112+
submake-contrib-spi: | submake-libpgport submake-generated-headers
109113
$(MAKE) -C$(top_builddir)/contrib/spi
110114

111115
.PHONY: submake-contrib-spi

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp