1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-30 06:01:21 +03:00

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.
This commit is contained in:
Tom Lane
2002-11-01 22:52:34 +00:00
parent 1e970dcee8
commit cab9437a43
17 changed files with 70 additions and 29 deletions

View File

@@ -1,4 +1,4 @@
# $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/Makefile,v 1.87 2002/10/21 18:05:24 petere Exp $
# $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/Makefile,v 1.88 2002/11/01 22:52:33 tgl Exp $
subdir = src/interfaces/ecpg/preproc
top_builddir = ../../../..
@@ -17,7 +17,7 @@ ifeq ($(GCC), yes)
override CFLAGS += -Wno-error
endif
OBJS=preproc.o pgc.o type.o ecpg.o ecpg_keywords.o output.o\
OBJS=preproc.o type.o ecpg.o ecpg_keywords.o output.o\
keywords.o c_keywords.o ../lib/typename.o descriptor.o variable.o
@@ -26,6 +26,9 @@ all: submake-libpgport ecpg
ecpg: $(OBJS)
$(CC) $(CFLAGS) $(LDFLAGS) $^ $(LIBS) -o $@
# pgc is compiled as part of preproc
preproc.o: $(srcdir)/pgc.c
$(srcdir)/preproc.c: $(srcdir)/preproc.h ;
$(srcdir)/preproc.h: preproc.y
@@ -44,7 +47,7 @@ else
@$(missing) flex $< $@
endif
c_keywords.o ecpg_keywords.o keywords.o pgc.o: preproc.h
c_keywords.o ecpg_keywords.o keywords.o preproc.o: preproc.h
distprep: $(srcdir)/preproc.c $(srcdir)/preproc.h $(srcdir)/pgc.c

View File

@@ -1,4 +1,4 @@
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/Attic/preproc.y,v 1.199 2002/10/21 13:09:31 meskes Exp $ */
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/Attic/preproc.y,v 1.200 2002/11/01 22:52:33 tgl Exp $ */
/* Copyright comment */
%{
@@ -5567,3 +5567,5 @@ void yyerror( char * error)
buf[sizeof(buf)-1]=0;
mmerror(PARSE_ERROR, ET_ERROR, buf);
}
#include "pgc.c"