Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5ba0f85

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-dateheaders (so install-all-headers before regular install will work).Per suggestion from Larry Rosenman.
1 parent17137d6 commit5ba0f85

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

‎src/include/Makefile

Lines changed: 20 additions & 2 deletions
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
forfilein$(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+
forfilein 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)

[8]ページ先頭

©2009-2025 Movatter.jp