Fix oversight in previous error-reporting patch; mustn't pfree path string
[PostgreSQL.git] / src / backend / parser / Makefile
blob1e5ac944bf9ddcf997413fddb854fa90dd2a47a0
1 #-------------------------------------------------------------------------
3 # Makefile for parser
5 # $PostgreSQL$
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 parser.o parse_agg.o parse_cte.o parse_clause.o \
16 parse_expr.o parse_func.o parse_node.o parse_oper.o parse_relation.o \
17 parse_type.o parse_coerce.o parse_target.o parse_utilcmd.o scansup.o
19 FLEXFLAGS = -CF
21 include $(top_srcdir)/src/backend/common.mk
24 # scan is compiled as part of gram
25 gram.o: $(srcdir)/scan.c
28 # There is no correct way to write a rule that generates two files.
29 # Rules with two targets don't have that meaning, they are merely
30 # shorthand for two otherwise separate rules. To be safe for parallel
31 # make, we must chain the dependencies like this. The semicolon is
32 # important, otherwise make will choose the built-in rule for
33 # gram.y=>gram.c.
35 $(srcdir)/gram.h: $(srcdir)/gram.c ;
37 $(srcdir)/gram.c: gram.y
38 ifdef BISON
39 $(BISON) -d $(BISONFLAGS) -o $@ $<
40 else
41 @$(missing) bison $< $@
42 endif
45 $(srcdir)/scan.c: scan.l
46 ifdef FLEX
47 $(FLEX) $(FLEXFLAGS) -o'$@' $<
48 else
49 @$(missing) flex $< $@
50 endif
53 # Force these dependencies to be known even without dependency info built:
54 gram.o keywords.o parser.o: $(srcdir)/gram.h
57 # gram.c, gram.h, and scan.c are in the distribution tarball, so they
58 # are not cleaned here.