Skip to content

Commit 7107d58

Browse files
committed
Fix misplacement of submake-generated-headers prerequisites.
The sequence "configure; cd src/pl/plpython; make -j" failed due to trying to compile plpython's .o files before the generated headers finished building. (This is an important real-world case, since it's the typical second step when building both plpython2 and plpython3.) This happens because the submake-generated-headers target is not placed in a way to make it a prerequisite to compiling the .o files. Fix that. Checking other uses of submake-generated-headers, I noted that the one attached to pg_regress was similarly misplaced; but it's actually not needed at all for pg_regress.o, rather regress.o, so move it to be a prerequisite of that. Back-patch to 9.6 where submake-generated-headers was introduced (by commit 548af97). It's not immediately clear to me why the previous coding didn't have the same issue; but since we've not had field reports of plpython make failing, leave it alone in the older branches. Pavel Raiskup and Tom Lane Discussion: <1925924.izSMJEZO3x@unused-4-107.brq.redhat.com>
1 parent a432729 commit 7107d58

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/pl/plpython/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@ REGRESS_PLPYTHON3_MANGLE := $(REGRESS)
9595

9696
include $(top_srcdir)/src/Makefile.shlib
9797

98-
all: submake-generated-headers all-lib
98+
all: all-lib
99+
100+
$(OBJS): | submake-generated-headers
99101

100102

101103
install: all install-lib install-data

src/test/regress/GNUmakefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ EXTRADEFS = '-DHOST_TUPLE="$(host_tuple)"' \
3636

3737
all: pg_regress$(X)
3838

39-
pg_regress$(X): pg_regress.o pg_regress_main.o $(WIN32RES) | submake-libpgport submake-generated-headers
39+
pg_regress$(X): pg_regress.o pg_regress_main.o $(WIN32RES) | submake-libpgport
4040
$(CC) $(CFLAGS) $^ $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@
4141

4242
# dependencies ensure that path changes propagate
@@ -65,6 +65,8 @@ include $(top_srcdir)/src/Makefile.shlib
6565

6666
all: all-lib
6767

68+
$(OBJS): | submake-generated-headers
69+
6870
# Test input and expected files. These are created by pg_regress itself, so we
6971
# don't have a rule to create them. We do need rules to clean them however.
7072
input_files = $(patsubst $(srcdir)/input/%.source,sql/%.sql, $(wildcard $(srcdir)/input/*.source))

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