Have pg_upgrade's Makefile honor NO_TEMP_INSTALL
authorAndrew Dunstan <andrew@dunslane.net>
Sun, 31 Mar 2019 12:08:14 +0000 (08:08 -0400)
committerAndrew Dunstan <andrew@dunslane.net>
Sun, 31 Mar 2019 12:22:04 +0000 (08:22 -0400)
Backpatch to 9.5, when pg_upgrade's location changed.

Discussion: https://postgr.es/m/5506b8fa-7dad-8483-053c-7ca7ef04f01a@2ndQuadrant.com

src/bin/pg_upgrade/Makefile

index e3a0cd702ddd68e8268ee337ccea70d415cee866..c97b2728c60a90036c1902cf512b15a5a1977a2a 100644 (file)
@@ -14,6 +14,15 @@ OBJS = check.o controldata.o dump.o exec.o file.o function.o info.o \
 override CPPFLAGS := -DDLSUFFIX=\"$(DLSUFFIX)\" -I$(srcdir) -I$(libpq_srcdir) $(CPPFLAGS)
 LDFLAGS_INTERNAL += -L$(top_builddir)/src/fe_utils -lpgfeutils $(libpq_pgport)
 
+ifdef NO_TEMP_INSTALL
+   tbindir=$(abs_top_builddir)/tmp_install/$(bindir)
+   tlibdir=$(abs_top_builddir)/tmp_install/$(libdir)
+   DOINST =
+else
+   tbindir=$(bindir)
+   tlibdir=$(libdir)
+   DOINST = --install
+endif
 
 all: pg_upgrade
 
@@ -36,7 +45,7 @@ clean distclean maintainer-clean:
           pg_upgrade_dump_*.custom pg_upgrade_*.log
 
 check: test.sh all
-   MAKE=$(MAKE) bindir=$(bindir) libdir=$(libdir) EXTRA_REGRESS_OPTS="$(EXTRA_REGRESS_OPTS)" $(SHELL) $< --install
+   MAKE=$(MAKE) bindir="$(tbindir)" libdir="$(tlibdir)" EXTRA_REGRESS_OPTS="$(EXTRA_REGRESS_OPTS)" $(SHELL) $< $(DOINST)
 
 # disabled because it upsets the build farm
 #installcheck: test.sh