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

Commit 5ba0f85

Browse files
committed
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.
1 parent 17137d6 commit 5ba0f85

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

src/include/Makefile

+20-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# programming. 'make install-all-headers' installs the whole contents
77
# of src/include.
88
#
9-
# $Header: /cvsroot/pgsql/src/include/Makefile,v 1.6 2001/02/10 02:31:28 tgl Exp $
9+
# $Header: /cvsroot/pgsql/src/include/Makefile,v 1.7 2001/02/20 20:37:13 tgl Exp $
1010
#
1111
#-------------------------------------------------------------------------
1212

@@ -32,7 +32,7 @@ all: $(HEADERS)
3232

3333
# Install only selected headers
3434

35-
install: all installdirs
35+
install: all installdirs remove-old-headers
3636
for file in $(srcdir_headers); do \
3737
$(INSTALL_DATA) $(srcdir)/$$file $(DESTDIR)$(includedir)/$$file || exit; \
3838
done
@@ -64,6 +64,24 @@ install-all-dirs:
6464
$(mkinstalldirs) $(addprefix $(DESTDIR)$(includedir)/, $(SUBDIRS))
6565

6666

67+
# Pre-7.1 Postgres installed some headers that are no longer installed by
68+
# default. If we see these headers in the target directory, zap them to
69+
# avoid cross-version compile problems. However, don't zap them if they
70+
# match current sources (that means the user did install-all-headers).
71+
72+
remove-old-headers:
73+
for file in fmgr.h postgres.h access/attnum.h commands/trigger.h \
74+
executor/spi.h utils/elog.h utils/geo_decls.h utils/mcxt.h \
75+
utils/palloc.h; do \
76+
if cmp -s $(srcdir)/$$file $(DESTDIR)$(includedir)/$$file; \
77+
then \
78+
: ; \
79+
else \
80+
rm -f $(DESTDIR)$(includedir)/$$file; \
81+
fi \
82+
done
83+
84+
6785
# This isn't a complete uninstall, but rm'ing everything under
6886
# $(DESTDIR)$(includedir) is probably too drastic...
6987
uninstall:

0 commit comments

Comments
 (0)