aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2015-09-28 10:47:05 -0400
committerRobert Haas <rhaas@postgresql.org>2015-09-28 10:52:19 -0400
commit80e2694b284cd9395b1ee8ef476f5f720ee50566 (patch)
tree968a25c428a66b1d0ea8e84bd25823b3d70bea4f /src
parent27af56b59515a676e733a143e0ebaf9e0c921be6 (diff)
downloadpostgresql-80e2694b284cd9395b1ee8ef476f5f720ee50566.tar.gz
postgresql-80e2694b284cd9395b1ee8ef476f5f720ee50566.zip
Don't try to create a temp install without abs_top_builddir.
Otherwise, we effectively act as if abs_top_builddir were the root directory, which is quite dangerous if the user happens to have permissions to do things there. This can crop up in PGXS builds, for example. Report by Sandro Santilli, patch by me, review by Noah Misch.
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.global.in2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Makefile.global.in b/src/Makefile.global.in
index e2c8aeacd40..13755148b55 100644
--- a/src/Makefile.global.in
+++ b/src/Makefile.global.in
@@ -320,6 +320,7 @@ check: temp-install
.PHONY: temp-install
temp-install:
ifndef NO_TEMP_INSTALL
+ifneq ($(abs_top_builddir),)
ifeq ($(MAKELEVEL),0)
rm -rf '$(abs_top_builddir)'/tmp_install
$(MKDIR_P) '$(abs_top_builddir)'/tmp_install/log
@@ -327,6 +328,7 @@ ifeq ($(MAKELEVEL),0)
endif
$(if $(EXTRA_INSTALL),for extra in $(EXTRA_INSTALL); do $(MAKE) -C '$(top_builddir)'/$$extra DESTDIR='$(abs_top_builddir)'/tmp_install install >>'$(abs_top_builddir)'/tmp_install/log/install.log || exit; done)
endif
+endif
PROVE = @PROVE@
PG_PROVE_FLAGS = -I $(top_srcdir)/src/test/perl/