From cab9437a43db6b233e2308aeb71a0b3bac600410 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 1 Nov 2002 22:52:34 +0000 Subject: Arrange to compile flex output files as inclusions into other files (usually bison output files), not as standalone files. This hack works around flex's insistence on including before we are able to include postgres.h; postgres.h will already be read before the compiler starts to read the flex output file. Needed for largefile support on some platforms. --- src/pl/plpgsql/src/Makefile | 9 ++++++--- src/pl/plpgsql/src/gram.y | 4 +++- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'src/pl') diff --git a/src/pl/plpgsql/src/Makefile b/src/pl/plpgsql/src/Makefile index 2ab565a806..2ac216608b 100644 --- a/src/pl/plpgsql/src/Makefile +++ b/src/pl/plpgsql/src/Makefile @@ -2,7 +2,7 @@ # # Makefile for the plpgsql shared object # -# $Header: /cvsroot/pgsql/src/pl/plpgsql/src/Makefile,v 1.22 2002/09/05 18:28:46 petere Exp $ +# $Header: /cvsroot/pgsql/src/pl/plpgsql/src/Makefile,v 1.23 2002/11/01 22:52:34 tgl Exp $ # #------------------------------------------------------------------------- @@ -23,7 +23,7 @@ override CPPFLAGS := -I$(srcdir) $(CPPFLAGS) SHLIB_LINK = $(BE_DLLLIBS) rpath := -OBJS = pl_gram.o pl_scan.o pl_handler.o pl_comp.o pl_exec.o pl_funcs.o +OBJS = pl_gram.o pl_handler.o pl_comp.o pl_exec.o pl_funcs.o ifneq ($(PORTNAME), qnx4) all: all-lib @@ -59,7 +59,10 @@ installdirs: uninstall: rm -f $(DESTDIR)$(pkglibdir)/plpgsql$(DLSUFFIX) -pl_gram.o pl_scan.o pl_handler.o pl_comp.o pl_exec.o pl_funcs.o: plpgsql.h $(srcdir)/pl.tab.h +pl_gram.o pl_handler.o pl_comp.o pl_exec.o pl_funcs.o: plpgsql.h $(srcdir)/pl.tab.h + +# pl_scan is compiled as part of pl_gram +pl_gram.o: $(srcdir)/pl_scan.c # Note: Since the yacc and lex files are shipped in the distribution, # they must be generated in the srcdir (as opposed to builddir). diff --git a/src/pl/plpgsql/src/gram.y b/src/pl/plpgsql/src/gram.y index 919bbd1b5e..d22e4aa0e4 100644 --- a/src/pl/plpgsql/src/gram.y +++ b/src/pl/plpgsql/src/gram.y @@ -4,7 +4,7 @@ * procedural language * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/pl/plpgsql/src/gram.y,v 1.38 2002/09/22 21:56:47 tgl Exp $ + * $Header: /cvsroot/pgsql/src/pl/plpgsql/src/gram.y,v 1.39 2002/11/01 22:52:34 tgl Exp $ * * This software is copyrighted by Jan Wieck - Hamburg. * @@ -1997,3 +1997,5 @@ check_assignable(PLpgSQL_datum *datum) break; } } + +#include "pl_scan.c" -- cgit v1.2.1