aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2012-06-27 13:40:51 +0300
committerPeter Eisentraut <peter_e@gmx.net>2012-06-27 13:40:51 +0300
commit9db7ccae2000524b72a4052352cbb5407fb53b02 (patch)
tree8ef44910b43b12bca21aabfd3278f1c5584e9322 /src
parentc60ca19de9ad777c51243605571d1d7606000f08 (diff)
downloadpostgresql-9db7ccae2000524b72a4052352cbb5407fb53b02.tar.gz
postgresql-9db7ccae2000524b72a4052352cbb5407fb53b02.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.global.in8
1 files changed, 6 insertions, 2 deletions
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 \