1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-21 00:42:43 +03:00

Link in keywords file instead of copying it.

Use #define/#ifdef instead of sed to fix include files, this should work on Windows too.
This commit is contained in:
Michael Meskes
2008-05-21 19:51:01 +00:00
parent 42ad6631cd
commit d82e7c84fa
3 changed files with 10 additions and 7 deletions

View File

@@ -4,7 +4,7 @@
#
# Copyright (c) 1998-2008, PostgreSQL Global Development Group
#
# $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/Makefile,v 1.134 2008/05/21 00:26:26 meskes Exp $
# $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/Makefile,v 1.135 2008/05/21 19:51:01 meskes Exp $
#
#-------------------------------------------------------------------------
@@ -22,7 +22,7 @@ override CPPFLAGS := -I../include -I$(top_srcdir)/src/interfaces/ecpg/include \
-DMINOR_VERSION=$(MINOR_VERSION) -DPATCHLEVEL=$(PATCHLEVEL) \
$(CPPFLAGS)
override CFLAGS += $(PTHREAD_CFLAGS)
override CFLAGS += $(PTHREAD_CFLAGS) -DECPG_COMPILE
OBJS= preproc.o type.o ecpg.o output.o parser.o \
keywords.o c_keywords.o ecpg_keywords.o ../ecpglib/typename.o descriptor.o variable.o \
@@ -59,7 +59,7 @@ ecpg_keywords.o c_keywords.o keywords.o preproc.o parser.o: preproc.h
# instead of maintaining our own list, take the one from the backend
# we cannot just link it in, but must copy and make some minor changes
keywords.c: % : $(top_srcdir)/src/backend/parser/%
sed -e 's/#include "parser\/parse.h"/#include "preproc.h"/' $< > $@
rm -f $@ && $(LN_S) $< .
distprep: $(srcdir)/preproc.c $(srcdir)/preproc.h $(srcdir)/pgc.c