aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2001-02-20 20:37:13 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2001-02-20 20:37:13 +0000
commit5ba0f855d18b450509956eb385ee22a8793cc5e2 (patch)
tree3900245071f1c2f161078d46534397da1b77ac82 /src
parent17137d6c5bbe6b04e867c4adf28cde49c9f337df (diff)
downloadpostgresql-5ba0f855d18b450509956eb385ee22a8793cc5e2.tar.gz
postgresql-5ba0f855d18b450509956eb385ee22a8793cc5e2.zip
Clean out any old versions of no-longer-installed header files that may
be lurking in the install target directory. But don't zap up-to-date headers (so install-all-headers before regular install will work). Per suggestion from Larry Rosenman.
Diffstat (limited to 'src')
-rw-r--r--src/include/Makefile22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/include/Makefile b/src/include/Makefile
index df3c9a2f89c..374247a20d7 100644
--- a/src/include/Makefile
+++ b/src/include/Makefile
@@ -6,7 +6,7 @@
# programming. 'make install-all-headers' installs the whole contents
# of src/include.
#
-# $Header: /cvsroot/pgsql/src/include/Makefile,v 1.6 2001/02/10 02:31:28 tgl Exp $
+# $Header: /cvsroot/pgsql/src/include/Makefile,v 1.7 2001/02/20 20:37:13 tgl Exp $
#
#-------------------------------------------------------------------------
@@ -32,7 +32,7 @@ all: $(HEADERS)
# Install only selected headers
-install: all installdirs
+install: all installdirs remove-old-headers
for file in $(srcdir_headers); do \
$(INSTALL_DATA) $(srcdir)/$$file $(DESTDIR)$(includedir)/$$file || exit; \
done
@@ -64,6 +64,24 @@ install-all-dirs:
$(mkinstalldirs) $(addprefix $(DESTDIR)$(includedir)/, $(SUBDIRS))
+# Pre-7.1 Postgres installed some headers that are no longer installed by
+# default. If we see these headers in the target directory, zap them to
+# avoid cross-version compile problems. However, don't zap them if they
+# match current sources (that means the user did install-all-headers).
+
+remove-old-headers:
+ for file in fmgr.h postgres.h access/attnum.h commands/trigger.h \
+ executor/spi.h utils/elog.h utils/geo_decls.h utils/mcxt.h \
+ utils/palloc.h; do \
+ if cmp -s $(srcdir)/$$file $(DESTDIR)$(includedir)/$$file; \
+ then \
+ : ; \
+ else \
+ rm -f $(DESTDIR)$(includedir)/$$file; \
+ fi \
+ done
+
+
# This isn't a complete uninstall, but rm'ing everything under
# $(DESTDIR)$(includedir) is probably too drastic...
uninstall: