diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2022-09-12 22:33:59 +0300 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2022-09-12 22:33:59 +0300 |
commit | c0a1d7621b0a6086630919d91dc031eea72ab0b6 (patch) | |
tree | 3b029893017ae4f062e7d4ddf58f098ce640582b | |
parent | e8d78581bb864369035c736a82ecfb57482a1a09 (diff) | |
download | postgresql-c0a1d7621b0a6086630919d91dc031eea72ab0b6.tar.gz postgresql-c0a1d7621b0a6086630919d91dc031eea72ab0b6.zip |
Use normal install program to install server headers.
Commit a7032690f9 replaced $(INSTALL) with plain "cp" for installing the
server header files. It sped up "make install" significantly, because
the old logic called $(INSTALL) separately for every header file,
whereas plain "cp" could copy all the files in one command. However, we
have long since made it a requirement that $(INSTALL) can also install
multiple files in one command, see commit f1c5247563. Switch back to
$(INSTALL).
Discussion: https://www.postgresql.org/message-id/200503252305.j2PN52m23610%40candle.pha.pa.us
Discussion: https://www.postgresql.org/message-id/2415283.1641852217%40sss.pgh.pa.us
-rw-r--r-- | src/include/Makefile | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/include/Makefile b/src/include/Makefile index 0b4cab9bb11..1e504006170 100644 --- a/src/include/Makefile +++ b/src/include/Makefile @@ -48,22 +48,15 @@ install: all installdirs $(INSTALL_DATA) utils/errcodes.h '$(DESTDIR)$(includedir_server)/utils' $(INSTALL_DATA) utils/fmgroids.h '$(DESTDIR)$(includedir_server)/utils' $(INSTALL_DATA) utils/fmgrprotos.h '$(DESTDIR)$(includedir_server)/utils' -# We don't use INSTALL_DATA for performance reasons --- there are a lot of files -# (in fact, we have to take some pains to avoid overlength shell commands here) - cp $(srcdir)/*.h '$(DESTDIR)$(includedir_server)'/ + $(INSTALL_DATA) $(srcdir)/*.h '$(DESTDIR)$(includedir_server)' for dir in $(SUBDIRS); do \ - cp $(srcdir)/$$dir/*.h '$(DESTDIR)$(includedir_server)'/$$dir/ || exit; \ + $(INSTALL_DATA) $(srcdir)/$$dir/*.h '$(DESTDIR)$(includedir_server)'/$$dir || exit; \ done ifeq ($(vpath_build),yes) for file in catalog/schemapg.h catalog/system_fk_info.h catalog/pg_*_d.h parser/gram.h storage/lwlocknames.h utils/probes.h; do \ - cp $$file '$(DESTDIR)$(includedir_server)'/$$file || exit; \ + $(INSTALL_DATA) $$file '$(DESTDIR)$(includedir_server)'/$$file || exit; \ done endif - cd '$(DESTDIR)$(includedir_server)' && chmod $(INSTALL_DATA_MODE) *.h - for dir in $(SUBDIRS); do \ - cd '$(DESTDIR)$(includedir_server)'/$$dir || exit; \ - chmod $(INSTALL_DATA_MODE) *.h || exit; \ - done installdirs: $(MKDIR_P) '$(DESTDIR)$(includedir)/libpq' '$(DESTDIR)$(includedir_internal)/libpq' |