From 9db7ccae2000524b72a4052352cbb5407fb53b02 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Wed, 27 Jun 2012 13:40:51 +0300 Subject: Use system install program when available and usable In a3176dac22c4cd14971e35119e245abee7649cb9 we switched to using install-sh unconditionally, because the configure check AC_PROG_INSTALL would pick up any random program named install, which has caused failure reports (http://archives.postgresql.org/pgsql-hackers/2001-03/msg00312.php). Now the configure check is much improved and should avoid false positives. It has also been shown that using a system install program can significantly reduce "make install" times, so it's worth trying. --- src/Makefile.global.in | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Makefile.global.in b/src/Makefile.global.in index e10c86cd311..97dea8a0581 100644 --- a/src/Makefile.global.in +++ b/src/Makefile.global.in @@ -289,7 +289,8 @@ BZIP2 = bzip2 # Installation. -INSTALL = $(SHELL) $(top_srcdir)/config/install-sh -c +install_sh = $(SHELL) $(top_srcdir)/config/install-sh -c +INSTALL = $(if $(use_install_sh),$(install_sh),$(or @INSTALL@,$(install_sh))) INSTALL_SCRIPT_MODE = 755 INSTALL_DATA_MODE = 644 @@ -561,7 +562,10 @@ endif # not PGXS install-strip: - @$(MAKE) INSTALL_PROGRAM_ENV="STRIPPROG='$(STRIP)'" \ +# install-strip always uses install-sh, so that strip options can be +# passed. + $(MAKE) use_install_sh=yes \ + INSTALL_PROGRAM_ENV="STRIPPROG='$(STRIP)'" \ INSTALL_STLIB_ENV="STRIPPROG='$(STRIP_STATIC_LIB)'" \ INSTALL_SHLIB_ENV="STRIPPROG='$(STRIP_SHARED_LIB)'" \ INSTALL_STRIP_FLAG=-s \ -- cgit v1.2.3