summaryrefslogtreecommitdiff
path: root/src/pl
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2002-11-01 22:52:34 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2002-11-01 22:52:34 +0000
commitcab9437a43db6b233e2308aeb71a0b3bac600410 (patch)
tree280ba825388918ace298e05f4d306b9cf71847ae /src/pl
parent1e970dcee821fbf6b1fa2aa64765ca762e0491f7 (diff)
downloadpostgresql-cab9437a43db6b233e2308aeb71a0b3bac600410.tar.gz
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 <stdio.h> 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.
Diffstat (limited to 'src/pl')
-rw-r--r--src/pl/plpgsql/src/Makefile9
-rw-r--r--src/pl/plpgsql/src/gram.y4
2 files changed, 9 insertions, 4 deletions
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"