summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian2005-03-25 23:22:54 +0000
committerBruce Momjian2005-03-25 23:22:54 +0000
commit34f0a44cc9b99559e0f441d3848a7758867564c8 (patch)
tree4f08652ccf6debef5656c64a322417ef5e8c4f47
parent3a71039288afac748cbe90cc3f80fe9e938e327d (diff)
Use 'cp' and 'chmod' in place of 'install' to install header files.
This reduces header file install from 8 seconds to 0.40 seconds.
-rw-r--r--src/Makefile.global.in6
-rw-r--r--src/include/Makefile11
2 files changed, 9 insertions, 8 deletions
diff --git a/src/Makefile.global.in b/src/Makefile.global.in
index 02d75f8e8b..81d30c54f9 100644
--- a/src/Makefile.global.in
+++ b/src/Makefile.global.in
@@ -232,9 +232,11 @@ BZIP2 = bzip2
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_SCRIPT = $(INSTALL) -m 755
-INSTALL_DATA = $(INSTALL) -m 644
+INSTALL_SCRIPT = $(INSTALL) -m $(INSTALL_SCRIPT_MODE)
+INSTALL_DATA = $(INSTALL) -m $(INSTALL_DATA_MODE)
INSTALL_STLIB = $(INSTALL_STLIB_ENV) $(INSTALL_DATA) $(INSTALL_STRIP_FLAG)
INSTALL_SHLIB = $(INSTALL_SHLIB_ENV) $(INSTALL) $(INSTALL_SHLIB_OPTS) $(INSTALL_STRIP_FLAG)
# Override in Makefile.port if necessary
diff --git a/src/include/Makefile b/src/include/Makefile
index ac5495be9e..dd2d914c40 100644
--- a/src/include/Makefile
+++ b/src/include/Makefile
@@ -37,13 +37,12 @@ install: all installdirs
# These headers are needed for server-side development
$(INSTALL_DATA) pg_config.h $(DESTDIR)$(includedir_server)
$(INSTALL_DATA) pg_config_os.h $(DESTDIR)$(includedir_server)
- for file in $(srcdir)/*.h; do \
- $(INSTALL_DATA) $$file $(DESTDIR)$(includedir_server)/`basename $$file` || exit; \
- done
+# We don't use INSTALL_DATA for performance reasons --- there are a lot of files
+ cp $(srcdir)/*.h $(DESTDIR)$(includedir_server)/ || exit; \
+ chmod $(INSTALL_DATA_MODE) $(DESTDIR)$(includedir_server)/*.h || exit; \
for dir in $(SUBDIRS); do \
- for file in $(srcdir)/$$dir/*.h; do \
- $(INSTALL_DATA) $$file $(DESTDIR)$(includedir_server)/$$dir/`basename $$file` || exit; \
- done \
+ cp $(srcdir)/$$dir/*.h $(DESTDIR)$(includedir_server)/$$dir/ || exit; \
+ chmod $(INSTALL_DATA_MODE) $(DESTDIR)$(includedir_server)/$$dir/*.h || exit; \
done
installdirs: