1996-10-27 10:55:05 +01:00
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
#
|
2000-07-19 18:30:27 +02:00
|
|
|
# Makefile for parser
|
1996-10-27 10:55:05 +01:00
|
|
|
#
|
2010-09-20 22:08:53 +02:00
|
|
|
# src/backend/parser/Makefile
|
1996-10-27 10:55:05 +01:00
|
|
|
#
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
|
2000-07-19 18:30:27 +02:00
|
|
|
subdir = src/backend/parser
|
|
|
|
top_builddir = ../../..
|
|
|
|
include $(top_builddir)/src/Makefile.global
|
1996-10-27 10:55:05 +01:00
|
|
|
|
2010-01-05 04:56:52 +01:00
|
|
|
override CPPFLAGS := -I. -I$(srcdir) $(CPPFLAGS)
|
2002-11-01 23:52:34 +01:00
|
|
|
|
2016-03-24 01:22:08 +01:00
|
|
|
OBJS= analyze.o gram.o scan.o parser.o \
|
2011-03-20 01:29:08 +01:00
|
|
|
parse_agg.o parse_clause.o parse_coerce.o parse_collate.o parse_cte.o \
|
|
|
|
parse_expr.o parse_func.o parse_node.o parse_oper.o parse_param.o \
|
|
|
|
parse_relation.o parse_target.o parse_type.o parse_utilcmd.o scansup.o
|
1996-10-27 10:55:05 +01:00
|
|
|
|
2008-02-19 11:30:09 +01:00
|
|
|
include $(top_srcdir)/src/backend/common.mk
|
2000-07-14 17:32:04 +02:00
|
|
|
|
2001-11-16 17:32:33 +01:00
|
|
|
|
2009-08-27 00:15:59 +02:00
|
|
|
# Latest flex causes warnings in this file.
|
|
|
|
ifeq ($(GCC),yes)
|
2016-03-19 17:07:16 +01:00
|
|
|
scan.o: CFLAGS += -Wno-error
|
2009-08-27 00:15:59 +02:00
|
|
|
endif
|
|
|
|
|
2002-11-01 23:52:34 +01:00
|
|
|
|
2001-11-16 17:32:33 +01:00
|
|
|
# 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
|
|
|
|
# make, we must chain the dependencies like this. The semicolon is
|
|
|
|
# important, otherwise make will choose the built-in rule for
|
|
|
|
# gram.y=>gram.c.
|
|
|
|
|
2009-08-28 22:26:19 +02:00
|
|
|
gram.h: gram.c ;
|
2001-11-16 17:32:33 +01:00
|
|
|
|
2012-10-11 12:57:04 +02:00
|
|
|
gram.c: BISONFLAGS += -d
|
|
|
|
gram.c: BISON_CHECK_CMD = $(PERL) $(srcdir)/check_keywords.pl $< $(top_srcdir)/src/include/parser/kwlist.h
|
1996-10-27 10:55:05 +01:00
|
|
|
|
2001-11-16 17:32:33 +01:00
|
|
|
|
2012-10-11 12:57:04 +02:00
|
|
|
scan.c: FLEXFLAGS = -CF -p -p
|
|
|
|
scan.c: FLEX_NO_BACKUP=yes
|
2000-07-19 18:30:27 +02:00
|
|
|
|
1996-10-27 10:55:05 +01:00
|
|
|
|
2001-05-05 00:01:03 +02:00
|
|
|
# Force these dependencies to be known even without dependency info built:
|
2016-03-24 01:22:08 +01:00
|
|
|
gram.o scan.o parser.o: gram.h
|
2000-07-19 18:30:27 +02:00
|
|
|
|
|
|
|
|
2008-08-29 15:02:33 +02:00
|
|
|
# gram.c, gram.h, and scan.c are in the distribution tarball, so they
|
2000-07-19 18:30:27 +02:00
|
|
|
# are not cleaned here.
|
2011-08-25 20:44:17 +02:00
|
|
|
clean distclean maintainer-clean:
|
|
|
|
rm -f lex.backup
|