Skip to content

Commit 5af2e97

Browse files
committed
pg_upgrade: Avoid check target accidentally breaking make's --output-sync.
When $(MAKE) is present in a rule, make assumes that target is a submake, and it doesn't need to buffer its output. But in this case it's a shell script that needs buffered output. Avoid that heuristic, by referring to $(MAKE) via an indirection. Discussion: https://postgr.es/m/20190521004717.qsktdsugj3shagco@alap3.anarazel.de
1 parent 7005389 commit 5af2e97

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/bin/pg_upgrade/Makefile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,17 @@ clean distclean maintainer-clean:
3535
pg_upgrade_dump_globals.sql \
3636
pg_upgrade_dump_*.custom pg_upgrade_*.log
3737

38+
# When $(MAKE) is present, make automatically infers that this is a
39+
# recursive make. which is not actually what we want here, as that
40+
# e.g. prevents output synchronization from working (as make thinks
41+
# that the subsidiary make knows how to deal with that itself, but
42+
# we're invoking a shell script that doesn't know). Referencing
43+
# $(MAKE) indirectly avoids that behaviour.
44+
# See https://www.gnu.org/software/make/manual/html_node/MAKE-Variable.html#MAKE-Variable
45+
NOTSUBMAKEMAKE=$(MAKE)
46+
3847
check: test.sh all temp-install
39-
MAKE=$(MAKE) $(with_temp_install) bindir=$(abs_top_builddir)/tmp_install/$(bindir) EXTRA_REGRESS_OPTS="$(EXTRA_REGRESS_OPTS)" $(SHELL) $<
48+
MAKE=$(NOTSUBMAKEMAKE) $(with_temp_install) bindir=$(abs_top_builddir)/tmp_install/$(bindir) EXTRA_REGRESS_OPTS="$(EXTRA_REGRESS_OPTS)" $(SHELL)
4049

4150
# installcheck is not supported because there's no meaningful way to test
4251
# pg_upgrade against a single already-running server

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