On tis, 2010-05-04 at 10:49 -0400, Tom Lane wrote: > Alvaro Herrera <alvhe...@commandprompt.com> writes: > > Graham wrote: > >> Build with VPATH works well upto installing > >> postgresql-9.0beta1/src/backend/catalog/postgres.bki > >> which is in the source tree not the object tree > > > Strange. I always use VPATH builds and I've never seen this problem. I > > only use CVS checkouts though. Maybe something is broken in the > > tarball. I'll have a look this afternoon is no one beats me to it. > > I don't think anyone has tried a VPATH build starting from a > distribution tarball. The OP is correct that things are going to fall > over in that case. My thought about fixing it was that postgres.bki > and related files ought to be forced to be built/used in $(srcdir), > but I didn't get further than that. Peter, what do you think?
We have a prebaked solution for this in the docs build. The attached patch appears to fix it.
Index: doc/src/sgml/Makefile =================================================================== RCS file: /cvsroot/pgsql/doc/src/sgml/Makefile,v retrieving revision 1.142 diff -u -3 -p -r1.142 Makefile --- doc/src/sgml/Makefile 1 May 2010 21:31:17 -0000 1.142 +++ doc/src/sgml/Makefile 4 May 2010 19:45:51 -0000 @@ -277,8 +277,6 @@ check: postgres.sgml $(ALMOSTALLSGML) ch ## Install ## -vpathsearch = `for f in $(addsuffix /$(1),$(subst :, ,. $(VPATH))); do test -r $$f && echo $$f && break; done` - install: install-html ifneq ($(PORTNAME), sco) Index: src/Makefile.global.in =================================================================== RCS file: /cvsroot/pgsql/src/Makefile.global.in,v retrieving revision 1.261 diff -u -3 -p -r1.261 Makefile.global.in --- src/Makefile.global.in 24 Mar 2010 13:14:02 -0000 1.261 +++ src/Makefile.global.in 4 May 2010 19:45:51 -0000 @@ -44,6 +44,8 @@ srcdir = $(top_srcdir)/$(subdir) VPATH = $(srcdir) endif +vpathsearch = `for f in $(addsuffix /$(1),$(subst :, ,. $(VPATH))); do test -r $$f && echo $$f && break; done` + # Saved arguments from configure configure_args = @configure_args@ Index: src/backend/catalog/Makefile =================================================================== RCS file: /cvsroot/pgsql/src/backend/catalog/Makefile,v retrieving revision 1.77 diff -u -3 -p -r1.77 Makefile --- src/backend/catalog/Makefile 16 Feb 2010 22:34:43 -0000 1.77 +++ src/backend/catalog/Makefile 4 May 2010 19:45:51 -0000 @@ -59,9 +59,9 @@ postgres.bki: genbki.pl Catalog.pm $(POS .PHONY: install-data install-data: $(BKIFILES) installdirs - $(INSTALL_DATA) postgres.bki '$(DESTDIR)$(datadir)/postgres.bki' - $(INSTALL_DATA) postgres.description '$(DESTDIR)$(datadir)/postgres.description' - $(INSTALL_DATA) postgres.shdescription '$(DESTDIR)$(datadir)/postgres.shdescription' + $(INSTALL_DATA) $(call vpathsearch,postgres.bki) '$(DESTDIR)$(datadir)/postgres.bki' + $(INSTALL_DATA) $(call vpathsearch,postgres.description) '$(DESTDIR)$(datadir)/postgres.description' + $(INSTALL_DATA) $(call vpathsearch,postgres.shdescription) '$(DESTDIR)$(datadir)/postgres.shdescription' $(INSTALL_DATA) $(srcdir)/system_views.sql '$(DESTDIR)$(datadir)/system_views.sql' $(INSTALL_DATA) $(srcdir)/information_schema.sql '$(DESTDIR)$(datadir)/information_schema.sql' $(INSTALL_DATA) $(srcdir)/sql_features.txt '$(DESTDIR)$(datadir)/sql_features.txt'
-- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs