1 #-------------------------------------------------------------------------
5 # src/backend/parser/Makefile
7 #-------------------------------------------------------------------------
9 subdir = src/backend/parser
10 top_builddir = ../../..
11 include $(top_builddir)/src/Makefile.global
13 override CPPFLAGS := -I. -I$(srcdir) $(CPPFLAGS)
15 OBJS= analyze.o gram.o scan.o keywords.o kwlookup.o parser.o \
16 parse_agg.o parse_clause.o parse_coerce.o parse_collate.o parse_cte.o \
17 parse_expr.o parse_func.o parse_node.o parse_oper.o parse_param.o \
18 parse_relation.o parse_target.o parse_type.o parse_utilcmd.o scansup.o
20 include $(top_srcdir)/src/backend/common.mk
23 # Latest flex causes warnings in this file.
25 scan.o: CFLAGS += -Wno-error
29 # There is no correct way to write a rule that generates two files.
30 # Rules with two targets don't have that meaning, they are merely
31 # shorthand for two otherwise separate rules. To be safe for parallel
32 # make, we must chain the dependencies like this. The semicolon is
33 # important, otherwise make will choose the built-in rule for
38 gram.c: BISONFLAGS += -d
39 gram.c: BISON_CHECK_CMD = $(PERL) $(srcdir)/check_keywords.pl $< $(top_srcdir)/src/include/parser/kwlist.h
42 scan.c: FLEXFLAGS = -CF -p -p
43 scan.c: FLEX_NO_BACKUP=yes
46 # Force these dependencies to be known even without dependency info built:
47 gram.o scan.o keywords.o parser.o: gram.h
50 # gram.c, gram.h, and scan.c are in the distribution tarball, so they
51 # are not cleaned here.
52 clean distclean maintainer-clean: