Alvaro Herrera wrote: > Hi, > > I noticed that if you start from a clean tree, it doesn't work to build > pg_dump because gram.h has not been generated yet: > > make -C ../../../src/backend/parser keywords.o > make[1]: Entering directory > `/home/alvherre/Code/CVS/pgsql/build/00head/src/backend/parser' > gcc -O0 -Wall -Wmissing-prototypes -Wpointer-arith > -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -g > -I/pgsql/source/00head/src/backend/parser -I../../../src/include > -I/pgsql/source/00head/src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c > -o keywords.o /pgsql/source/00head/src/backend/parser/keywords.c -MMD -MP -MF > .deps/keywords.Po > /pgsql/source/00head/src/backend/parser/keywords.c:33:25: error: > parser/gram.h: No such file or directory > /pgsql/source/00head/src/backend/parser/keywords.c:46: error: 'ABORT_P' > undeclared here (not in a function)
This patch fixes it. The fmgroids.h bits are not needed for pg_dump, but they are if you start building on the parser directory. I don't care strongly for that one, so if people don't like it I'll just go ahead with the gram.h bit, unless anyone has a better idea. -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Index: src/backend/parser/Makefile =================================================================== RCS file: /home/alvherre/Code/cvs/pgsql/src/backend/parser/Makefile,v retrieving revision 1.48 diff -c -p -r1.48 Makefile *** src/backend/parser/Makefile 4 Oct 2008 21:56:54 -0000 1.48 --- src/backend/parser/Makefile 3 Mar 2009 21:18:17 -0000 *************** subdir = src/backend/parser *** 10,17 **** top_builddir = ../../.. include $(top_builddir)/src/Makefile.global - override CPPFLAGS := -I$(srcdir) $(CPPFLAGS) - OBJS= analyze.o gram.o keywords.o parser.o parse_agg.o parse_cte.o parse_clause.o \ parse_expr.o parse_func.o parse_node.o parse_oper.o parse_relation.o \ parse_type.o parse_coerce.o parse_target.o parse_utilcmd.o scansup.o --- 10,15 ---- *************** endif *** 52,57 **** --- 50,63 ---- # Force these dependencies to be known even without dependency info built: gram.o keywords.o parser.o: $(srcdir)/gram.h + keywords.o: $(top_builddir)/src/include/parser/gram.h + parse_func.o: $(top_builddir)/src/include/utils/fmgroids.h + parse_coerce.o: $(top_builddir)/src/include/utils/fmgroids.h + + $(top_builddir)/src/include/parser/gram.h: + $(MAKE) -C $(top_builddir)/src/backend ../../src/include/parser/gram.h + $(top_builddir)/src/include/utils/fmgroids.h: + $(MAKE) -C $(top_builddir)/src/backend ../../src/include/utils/fmgroids.h # gram.c, gram.h, and scan.c are in the distribution tarball, so they
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers