1 #-------------------------------------------------------------------------
5 # $PostgreSQL: pgsql/src/backend/parser/Makefile,v 1.52 2009/10/31 01:41:31 tgl Exp $
7 #-------------------------------------------------------------------------
9 subdir = src/backend/parser
10 top_builddir = ../../..
11 include $(top_builddir)/src/Makefile.global
13 override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
15 OBJS= analyze.o gram.o keywords.o kwlookup.o parser.o \
16 parse_agg.o parse_clause.o parse_coerce.o parse_cte.o parse_expr.o \
17 parse_func.o parse_node.o parse_oper.o parse_param.o parse_relation.o \
18 parse_target.o parse_type.o parse_utilcmd.o scansup.o
22 include $(top_srcdir)/src/backend/common.mk
25 # scan is compiled as part of gram
28 # Latest flex causes warnings in this file.
30 gram.o: CFLAGS += -Wno-error
34 # There is no correct way to write a rule that generates two files.
35 # Rules with two targets don't have that meaning, they are merely
36 # shorthand for two otherwise separate rules. To be safe for parallel
37 # make, we must chain the dependencies like this. The semicolon is
38 # important, otherwise make will choose the built-in rule for
45 $(BISON) -d $(BISONFLAGS) -o $@ $<
47 @$(missing) bison $< $@
53 $(FLEX) $(FLEXFLAGS) -o'$@' $<
55 @$(missing) flex $< $@
59 # Force these dependencies to be known even without dependency info built:
60 gram.o keywords.o parser.o: gram.h
63 # gram.c, gram.h, and scan.c are in the distribution tarball, so they
64 # are not cleaned here.