summaryrefslogtreecommitdiff
path: root/src/backend/bootstrap
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/bootstrap
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/bootstrap')
-rw-r--r--src/backend/bootstrap/Makefile10
-rw-r--r--src/backend/bootstrap/bootparse.y4
-rw-r--r--src/backend/bootstrap/bootscanner.l4
3 files changed, 11 insertions, 7 deletions
diff --git a/src/backend/bootstrap/Makefile b/src/backend/bootstrap/Makefile
index b45d42b7459..8b43344f6e9 100644
--- a/src/backend/bootstrap/Makefile
+++ b/src/backend/bootstrap/Makefile
@@ -2,7 +2,7 @@
#
# Makefile for the bootstrap module
#
-# $Header: /cvsroot/pgsql/src/backend/bootstrap/Makefile,v 1.30 2002/01/09 00:06:42 tgl Exp $
+# $Header: /cvsroot/pgsql/src/backend/bootstrap/Makefile,v 1.31 2002/11/01 22:52:33 tgl Exp $
#
#-------------------------------------------------------------------------
@@ -14,9 +14,9 @@ override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
# qnx4's wlink currently crashes with bootstrap.o
ifneq ($(PORTNAME), qnx4)
-OBJS= bootparse.o bootscanner.o bootstrap.o
+OBJS= bootparse.o bootstrap.o
else
-OBJS= bootparse.o bootscanner.o
+OBJS= bootparse.o
endif
@@ -27,8 +27,10 @@ SUBSYS.o: $(OBJS)
$(LD) $(LDREL) $(LDOUT) $@ $^
-bootstrap.o bootscanner.o: $(srcdir)/bootstrap_tokens.h
+bootstrap.o bootparse.o: $(srcdir)/bootstrap_tokens.h
+# bootscanner is compiled as part of bootparse
+bootparse.o: $(srcdir)/bootscanner.c
# `sed' rules to remove conflicts between bootstrap scanner and parser
# and the SQL scanner and parser. For correctness' sake the rules that
diff --git a/src/backend/bootstrap/bootparse.y b/src/backend/bootstrap/bootparse.y
index 113f11de712..093086614fc 100644
--- a/src/backend/bootstrap/bootparse.y
+++ b/src/backend/bootstrap/bootparse.y
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootparse.y,v 1.52 2002/09/02 01:05:03 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootparse.y,v 1.53 2002/11/01 22:52:33 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -335,3 +335,5 @@ boot_ident :
ID { $$=yylval.ival; }
;
%%
+
+#include "bootscanner.c"
diff --git a/src/backend/bootstrap/bootscanner.l b/src/backend/bootstrap/bootscanner.l
index ac94d0001bc..7e5a269775d 100644
--- a/src/backend/bootstrap/bootscanner.l
+++ b/src/backend/bootstrap/bootscanner.l
@@ -1,7 +1,7 @@
%{
/*-------------------------------------------------------------------------
*
- * bootscanner.lex
+ * bootscanner.l
* a lexical scanner for the bootstrap parser
*
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootscanner.l,v 1.25 2002/07/30 16:33:08 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootscanner.l,v 1.26 2002/11/01 22:52:33 tgl Exp $
*
*-------------------------------------------------------------------------
*/