pgsql: Remove all traces that suggest that a non-Bison yacc might be

Started by Nonameover 17 years ago6 messages
#1Noname
petere@postgresql.org

Log Message:
-----------
Remove all traces that suggest that a non-Bison yacc might be supported, and
change build system to use only Bison. Simplify build rules, make file names
uniform. Don't build the token table header file where it is not needed.

Modified Files:
--------------
pgsql:
configure (r1.602 -> r1.603)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/configure?r1=1.602&r2=1.603)
configure.in (r1.564 -> r1.565)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/configure.in?r1=1.564&r2=1.565)
pgsql/config:
programs.m4 (r1.23 -> r1.24)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/config/programs.m4?r1=1.23&r2=1.24)
pgsql/contrib/cube:
.cvsignore (r1.1 -> r1.2)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/contrib/cube/.cvsignore?r1=1.1&r2=1.2)
Makefile (r1.21 -> r1.22)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/contrib/cube/Makefile?r1=1.21&r2=1.22)
pgsql/contrib/seg:
.cvsignore (r1.1 -> r1.2)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/contrib/seg/.cvsignore?r1=1.1&r2=1.2)
Makefile (r1.20 -> r1.21)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/contrib/seg/Makefile?r1=1.20&r2=1.21)
pgsql/doc/src/sgml:
installation.sgml (r1.311 -> r1.312)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/installation.sgml?r1=1.311&r2=1.312)
pgsql/src:
Makefile.global.in (r1.241 -> r1.242)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/Makefile.global.in?r1=1.241&r2=1.242)
pgsql/src/backend:
Makefile (r1.129 -> r1.130)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/Makefile?r1=1.129&r2=1.130)
pgsql/src/backend/bootstrap:
.cvsignore (r1.1 -> r1.2)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/bootstrap/.cvsignore?r1=1.1&r2=1.2)
Makefile (r1.36 -> r1.37)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/bootstrap/Makefile?r1=1.36&r2=1.37)
bootscanner.l (r1.46 -> r1.47)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/bootstrap/bootscanner.l?r1=1.46&r2=1.47)
pgsql/src/backend/parser:
.cvsignore (r1.1 -> r1.2)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/.cvsignore?r1=1.1&r2=1.2)
Makefile (r1.46 -> r1.47)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/Makefile?r1=1.46&r2=1.47)
keywords.c (r1.199 -> r1.200)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/keywords.c?r1=1.199&r2=1.200)
parser.c (r1.73 -> r1.74)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/parser.c?r1=1.73&r2=1.74)
scan.l (r1.144 -> r1.145)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/scan.l?r1=1.144&r2=1.145)
pgsql/src/include:
Makefile (r1.25 -> r1.26)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/Makefile?r1=1.25&r2=1.26)
pgsql/src/interfaces/ecpg/preproc:
Makefile (r1.135 -> r1.136)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/interfaces/ecpg/preproc/Makefile?r1=1.135&r2=1.136)
pgsql/src/pl/plpgsql/src:
.cvsignore (r1.1 -> r1.2)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpgsql/src/.cvsignore?r1=1.1&r2=1.2)
Makefile (r1.32 -> r1.33)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpgsql/src/Makefile?r1=1.32&r2=1.33)
pl_comp.c (r1.128 -> r1.129)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpgsql/src/pl_comp.c?r1=1.128&r2=1.129)
pl_exec.c (r1.217 -> r1.218)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpgsql/src/pl_exec.c?r1=1.217&r2=1.218)
pl_funcs.c (r1.72 -> r1.73)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpgsql/src/pl_funcs.c?r1=1.72&r2=1.73)
pl_handler.c (r1.39 -> r1.40)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpgsql/src/pl_handler.c?r1=1.39&r2=1.40)
pgsql/src/tools/msvc:
clean.bat (r1.13 -> r1.14)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/tools/msvc/clean.bat?r1=1.13&r2=1.14)
pgbison.bat (r1.8 -> r1.9)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/tools/msvc/pgbison.bat?r1=1.8&r2=1.9)

#2Alvaro Herrera
alvherre@commandprompt.com
In reply to: Noname (#1)
Re: [COMMITTERS] pgsql: Remove all traces that suggest that a non-Bison yacc might be

Peter Eisentraut wrote:

Log Message:
-----------
Remove all traces that suggest that a non-Bison yacc might be supported, and
change build system to use only Bison. Simplify build rules, make file names
uniform. Don't build the token table header file where it is not needed.

I'm finding that this patch is needed to make this build on VPATH:

Index: src/backend/parser/Makefile
===================================================================
RCS file: /cvsroot/pgsql/src/backend/parser/Makefile,v
retrieving revision 1.47
diff -c -p -r1.47 Makefile
*** src/backend/parser/Makefile 29 Aug 2008 13:02:32 -0000      1.47
--- src/backend/parser/Makefile 29 Aug 2008 16:17:16 -0000
*************** subdir = src/backend/parser
*** 10,16 ****
  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_clause.o \
        parse_expr.o parse_func.o parse_node.o parse_oper.o parse_relation.o \
--- 10,16 ----
  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_clause.o \
parse_expr.o parse_func.o parse_node.o parse_oper.o parse_relation.o \

The problem is that keywords.c is #including "parser/gram.h" but since
we're doing a -I.../backend/parser then it doesn't find it.

I don't understand why it was working previously.

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

#3Peter Eisentraut
peter_e@gmx.net
In reply to: Alvaro Herrera (#2)
Re: Re: [COMMITTERS] pgsql: Remove all traces that suggest that a non-Bison yacc might be

Alvaro Herrera wrote:

I'm finding that this patch is needed to make this build on VPATH:

I cannot reproduce any problem with a vpath build. Make sure you have
really cleaned the source tree from previous rounds. Some of the files
involved are symlinks, which might confuse make.

Index: src/backend/parser/Makefile
===================================================================
RCS file: /cvsroot/pgsql/src/backend/parser/Makefile,v
retrieving revision 1.47
diff -c -p -r1.47 Makefile
*** src/backend/parser/Makefile 29 Aug 2008 13:02:32 -0000      1.47
--- src/backend/parser/Makefile 29 Aug 2008 16:17:16 -0000
*************** subdir = src/backend/parser
*** 10,16 ****
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_clause.o \
parse_expr.o parse_func.o parse_node.o parse_oper.o parse_relation.o \
--- 10,16 ----
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_clause.o \
parse_expr.o parse_func.o parse_node.o parse_oper.o parse_relation.o \

This would create a reference to src/backend, but no .h file should ever
live there.

The problem is that keywords.c is #including "parser/gram.h" but since
we're doing a -I.../backend/parser then it doesn't find it.

I don't understand why it was working previously.

I think the -I$(srcdir) is actually useless, and you are just
accidentally adapting it for your workaround.

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Peter Eisentraut (#3)
Re: Re: [COMMITTERS] pgsql: Remove all traces that suggest that a non-Bison yacc might be

Peter Eisentraut <peter_e@gmx.net> writes:

I cannot reproduce any problem with a vpath build. Make sure you have
really cleaned the source tree from previous rounds. Some of the files
involved are symlinks, which might confuse make.

"make maintainer-clean" before pulling this update would be a good idea,
else you're going to have junk laying about in your source tree.

I think the -I$(srcdir) is actually useless, and you are just
accidentally adapting it for your workaround.

Yeah, it should be finding the symlink in $builddir/src/include/parser.

If the -I isn't needed, shouldn't we get rid of it?

regards, tom lane

#5Alvaro Herrera
alvherre@commandprompt.com
In reply to: Peter Eisentraut (#3)
Re: Re: [COMMITTERS] pgsql: Remove all traces that suggest that a non-Bison yacc might be

Peter Eisentraut wrote:

Alvaro Herrera wrote:

I'm finding that this patch is needed to make this build on VPATH:

I cannot reproduce any problem with a vpath build. Make sure you have
really cleaned the source tree from previous rounds. Some of the files
involved are symlinks, which might confuse make.

Hmm, yeah, I just manually deleted everything mentioned in .cvsignore
and it works now.

It seems there's no way to do this directly. I have this:

find . -name .cvsignore | while read line
do
dir=$(dirname $line)
cd $dir
rm -fv `cat .cvsignore`
cd "$OLDPWD"
done

Could we have a target in the root Makefile for this? Right now it
bails out with

$ make distclean
You need to run the 'configure' program first. See the file
'INSTALL' for installation instructions.
make: *** [distclean] Erreur 1

! override CPPFLAGS := -I$(srcdir)/.. $(CPPFLAGS)

This would create a reference to src/backend, but no .h file should ever
live there.

Right -- the point is that keywords.c has
#include "parser/gram.h"
so if you start from src/backend, then the file is found.

The problem is that keywords.c is #including "parser/gram.h" but since
we're doing a -I.../backend/parser then it doesn't find it.

I don't understand why it was working previously.

I think the -I$(srcdir) is actually useless, and you are just
accidentally adapting it for your workaround.

Could be. Maybe we could just remove the line to avoid future
confusion.

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

#6Alvaro Herrera
alvherre@commandprompt.com
In reply to: Tom Lane (#4)
Re: Re: [COMMITTERS] pgsql: Remove all traces that suggest that a non-Bison yacc might be

Tom Lane wrote:

Peter Eisentraut <peter_e@gmx.net> writes:

I cannot reproduce any problem with a vpath build. Make sure you have
really cleaned the source tree from previous rounds. Some of the files
involved are symlinks, which might confuse make.

"make maintainer-clean" before pulling this update would be a good idea,
else you're going to have junk laying about in your source tree.

Ah, so that's the necessary trick. Thanks.

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support