Use 'cp' and 'chmod' in place of 'install' to install header files.

This reduces header file install from 8 seconds to 0.40 seconds.
This commit is contained in:
Bruce Momjian 2005-03-25 23:22:54 +00:00
parent e341a52037
commit a7032690f9
2 changed files with 11 additions and 10 deletions

View File

@ -1,5 +1,5 @@
# -*-makefile-*- # -*-makefile-*-
# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.212 2005/03/25 18:17:12 momjian Exp $ # $PostgreSQL: pgsql/src/Makefile.global.in,v 1.213 2005/03/25 23:22:53 momjian Exp $
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# All PostgreSQL makefiles include this file and use the variables it sets, # All PostgreSQL makefiles include this file and use the variables it sets,
@ -232,9 +232,11 @@ BZIP2 = bzip2
INSTALL = $(SHELL) $(top_srcdir)/config/install-sh -c INSTALL = $(SHELL) $(top_srcdir)/config/install-sh -c
INSTALL_SCRIPT_MODE = 755
INSTALL_DATA_MODE = 644
INSTALL_PROGRAM = $(INSTALL_PROGRAM_ENV) $(INSTALL) $(INSTALL_STRIP_FLAG) INSTALL_PROGRAM = $(INSTALL_PROGRAM_ENV) $(INSTALL) $(INSTALL_STRIP_FLAG)
INSTALL_SCRIPT = $(INSTALL) -m 755 INSTALL_SCRIPT = $(INSTALL) -m $(INSTALL_SCRIPT_MODE)
INSTALL_DATA = $(INSTALL) -m 644 INSTALL_DATA = $(INSTALL) -m $(INSTALL_DATA_MODE)
INSTALL_STLIB = $(INSTALL_STLIB_ENV) $(INSTALL_DATA) $(INSTALL_STRIP_FLAG) INSTALL_STLIB = $(INSTALL_STLIB_ENV) $(INSTALL_DATA) $(INSTALL_STRIP_FLAG)
INSTALL_SHLIB = $(INSTALL_SHLIB_ENV) $(INSTALL) $(INSTALL_SHLIB_OPTS) $(INSTALL_STRIP_FLAG) INSTALL_SHLIB = $(INSTALL_SHLIB_ENV) $(INSTALL) $(INSTALL_SHLIB_OPTS) $(INSTALL_STRIP_FLAG)
# Override in Makefile.port if necessary # Override in Makefile.port if necessary

View File

@ -4,7 +4,7 @@
# #
# 'make install' installs whole contents of src/include. # 'make install' installs whole contents of src/include.
# #
# $PostgreSQL: pgsql/src/include/Makefile,v 1.19 2005/01/06 21:00:24 tgl Exp $ # $PostgreSQL: pgsql/src/include/Makefile,v 1.20 2005/03/25 23:22:54 momjian Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
@ -37,13 +37,12 @@ install: all installdirs
# These headers are needed for server-side development # These headers are needed for server-side development
$(INSTALL_DATA) pg_config.h $(DESTDIR)$(includedir_server) $(INSTALL_DATA) pg_config.h $(DESTDIR)$(includedir_server)
$(INSTALL_DATA) pg_config_os.h $(DESTDIR)$(includedir_server) $(INSTALL_DATA) pg_config_os.h $(DESTDIR)$(includedir_server)
for file in $(srcdir)/*.h; do \ # We don't use INSTALL_DATA for performance reasons --- there are a lot of files
$(INSTALL_DATA) $$file $(DESTDIR)$(includedir_server)/`basename $$file` || exit; \ cp $(srcdir)/*.h $(DESTDIR)$(includedir_server)/ || exit; \
done chmod $(INSTALL_DATA_MODE) $(DESTDIR)$(includedir_server)/*.h || exit; \
for dir in $(SUBDIRS); do \ for dir in $(SUBDIRS); do \
for file in $(srcdir)/$$dir/*.h; do \ cp $(srcdir)/$$dir/*.h $(DESTDIR)$(includedir_server)/$$dir/ || exit; \
$(INSTALL_DATA) $$file $(DESTDIR)$(includedir_server)/$$dir/`basename $$file` || exit; \ chmod $(INSTALL_DATA_MODE) $(DESTDIR)$(includedir_server)/$$dir/*.h || exit; \
done \
done done
installdirs: installdirs: