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-01-05 04:56:52 +01:00
|
|
|
# $PostgreSQL: pgsql/src/backend/parser/Makefile,v 1.53 2010/01/05 03:56:52 tgl Exp $
|
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
|
|
|
|
2009-10-31 02:41:31 +01:00
|
|
|
OBJS= analyze.o gram.o keywords.o kwlookup.o parser.o \
|
|
|
|
parse_agg.o parse_clause.o parse_coerce.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
|
|
|
|
2002-04-20 23:56:15 +02:00
|
|
|
FLEXFLAGS = -CF
|
|
|
|
|
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
|
|
|
|
2002-11-01 23:52:34 +01:00
|
|
|
# scan is compiled as part of gram
|
2009-08-28 22:26:19 +02:00
|
|
|
gram.o: scan.c
|
2002-11-01 23:52:34 +01:00
|
|
|
|
2009-08-27 00:15:59 +02:00
|
|
|
# Latest flex causes warnings in this file.
|
|
|
|
ifeq ($(GCC),yes)
|
|
|
|
gram.o: CFLAGS += -Wno-error
|
|
|
|
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
|
|
|
|
2009-08-28 22:26:19 +02:00
|
|
|
gram.c: gram.y
|
2008-08-29 15:02:33 +02:00
|
|
|
ifdef BISON
|
|
|
|
$(BISON) -d $(BISONFLAGS) -o $@ $<
|
2001-02-10 23:31:42 +01:00
|
|
|
else
|
|
|
|
@$(missing) bison $< $@
|
|
|
|
endif
|
1996-10-27 10:55:05 +01:00
|
|
|
|
2001-11-16 17:32:33 +01:00
|
|
|
|
2009-08-28 22:26:19 +02:00
|
|
|
scan.c: scan.l
|
2000-08-28 13:53:23 +02:00
|
|
|
ifdef FLEX
|
2002-04-20 23:56:15 +02:00
|
|
|
$(FLEX) $(FLEXFLAGS) -o'$@' $<
|
2000-08-28 13:53:23 +02:00
|
|
|
else
|
|
|
|
@$(missing) flex $< $@
|
|
|
|
endif
|
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:
|
2009-08-28 22:26:19 +02:00
|
|
|
gram.o keywords.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.
|