summaryrefslogtreecommitdiff
path: root/src/backend/parser
diff options
context:
space:
mode:
authorTom Lane2002-11-01 22:52:34 +0000
committerTom Lane2002-11-01 22:52:34 +0000
commitcab9437a43db6b233e2308aeb71a0b3bac600410 (patch)
tree280ba825388918ace298e05f4d306b9cf71847ae /src/backend/parser
parent1e970dcee821fbf6b1fa2aa64765ca762e0491f7 (diff)
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/backend/parser')
-rw-r--r--src/backend/parser/Makefile12
-rw-r--r--src/backend/parser/gram.y4
2 files changed, 12 insertions, 4 deletions
diff --git a/src/backend/parser/Makefile b/src/backend/parser/Makefile
index d5d4f4372d8..c11098eac2a 100644
--- a/src/backend/parser/Makefile
+++ b/src/backend/parser/Makefile
@@ -2,7 +2,7 @@
#
# Makefile for parser
#
-# $Header: /cvsroot/pgsql/src/backend/parser/Makefile,v 1.37 2002/04/20 21:56:14 petere Exp $
+# $Header: /cvsroot/pgsql/src/backend/parser/Makefile,v 1.38 2002/11/01 22:52:33 tgl Exp $
#
#-------------------------------------------------------------------------
@@ -10,9 +10,11 @@ subdir = src/backend/parser
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 \
- parse_type.o parse_coerce.o parse_target.o scan.o scansup.o
+ parse_type.o parse_coerce.o parse_target.o scansup.o
FLEXFLAGS = -CF
@@ -23,6 +25,10 @@ SUBSYS.o: $(OBJS)
$(LD) $(LDREL) $(LDOUT) $@ $^
+# scan is compiled as part of gram
+gram.o: $(srcdir)/scan.c
+
+
# There is no correct way to write a rule that generates two files.
# Rules with two targets don't have that meaning, they are merely
# shorthand for two otherwise separate rules. To be safe for parallel
@@ -52,7 +58,7 @@ endif
# Force these dependencies to be known even without dependency info built:
-keywords.o parse_clause.o parse_expr.o parser.o scan.o: $(srcdir)/parse.h
+keywords.o parse_clause.o parse_expr.o parser.o gram.o: $(srcdir)/parse.h
# gram.c, parse.h, and scan.c are in the distribution tarball, so they
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y
index d407fbbcd4a..32dd7b3480d 100644
--- a/src/backend/parser/gram.y
+++ b/src/backend/parser/gram.y
@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.371 2002/10/31 02:31:00 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.372 2002/11/01 22:52:33 tgl Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
@@ -7777,3 +7777,5 @@ doNegateFloat(Value *v)
v->val.str = newval;
}
}
+
+#include "scan.c"