Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit a703269

Browse files
committed
Use 'cp' and 'chmod' in place of 'install' to install header files.
This reduces header file install from 8 seconds to 0.40 seconds.
1 parent e341a52 commit a703269

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

src/Makefile.global.in

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*-makefile-*-
2-
# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.212 2005/03/25 18:17:12 momjian Exp $
2+
# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.213 2005/03/25 23:22:53 momjian Exp $
33

44
#------------------------------------------------------------------------------
55
# All PostgreSQL makefiles include this file and use the variables it sets,
@@ -232,9 +232,11 @@ BZIP2 = bzip2
232232

233233
INSTALL = $(SHELL) $(top_srcdir)/config/install-sh -c
234234

235+
INSTALL_SCRIPT_MODE = 755
236+
INSTALL_DATA_MODE = 644
235237
INSTALL_PROGRAM = $(INSTALL_PROGRAM_ENV) $(INSTALL) $(INSTALL_STRIP_FLAG)
236-
INSTALL_SCRIPT = $(INSTALL) -m 755
237-
INSTALL_DATA = $(INSTALL) -m 644
238+
INSTALL_SCRIPT = $(INSTALL) -m $(INSTALL_SCRIPT_MODE)
239+
INSTALL_DATA = $(INSTALL) -m $(INSTALL_DATA_MODE)
238240
INSTALL_STLIB = $(INSTALL_STLIB_ENV) $(INSTALL_DATA) $(INSTALL_STRIP_FLAG)
239241
INSTALL_SHLIB = $(INSTALL_SHLIB_ENV) $(INSTALL) $(INSTALL_SHLIB_OPTS) $(INSTALL_STRIP_FLAG)
240242
# Override in Makefile.port if necessary

src/include/Makefile

+6-7
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# 'make install' installs whole contents of src/include.
66
#
7-
# $PostgreSQL: pgsql/src/include/Makefile,v 1.19 2005/01/06 21:00:24 tgl Exp $
7+
# $PostgreSQL: pgsql/src/include/Makefile,v 1.20 2005/03/25 23:22:54 momjian Exp $
88
#
99
#-------------------------------------------------------------------------
1010

@@ -37,13 +37,12 @@ install: all installdirs
3737
# These headers are needed for server-side development
3838
$(INSTALL_DATA) pg_config.h $(DESTDIR)$(includedir_server)
3939
$(INSTALL_DATA) pg_config_os.h $(DESTDIR)$(includedir_server)
40-
for file in $(srcdir)/*.h; do \
41-
$(INSTALL_DATA) $$file $(DESTDIR)$(includedir_server)/`basename $$file` || exit; \
42-
done
40+
# We don't use INSTALL_DATA for performance reasons --- there are a lot of files
41+
cp $(srcdir)/*.h $(DESTDIR)$(includedir_server)/ || exit; \
42+
chmod $(INSTALL_DATA_MODE) $(DESTDIR)$(includedir_server)/*.h || exit; \
4343
for dir in $(SUBDIRS); do \
44-
for file in $(srcdir)/$$dir/*.h; do \
45-
$(INSTALL_DATA) $$file $(DESTDIR)$(includedir_server)/$$dir/`basename $$file` || exit; \
46-
done \
44+
cp $(srcdir)/$$dir/*.h $(DESTDIR)$(includedir_server)/$$dir/ || exit; \
45+
chmod $(INSTALL_DATA_MODE) $(DESTDIR)$(includedir_server)/$$dir/*.h || exit; \
4746
done
4847

4948
installdirs:

0 commit comments

Comments
 (0)