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
|
|
|
#
|
2000-07-19 18:30:27 +02:00
|
|
|
# $Header: /cvsroot/pgsql/src/backend/parser/Makefile,v 1.28 2000/07/19 16:29:50 petere 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
|
|
|
|
2000-07-19 18:30:27 +02:00
|
|
|
ifeq ($(GCC), yes)
|
1997-04-15 19:24:26 +02:00
|
|
|
CFLAGS+= -Wno-error
|
|
|
|
endif
|
|
|
|
|
1997-11-25 23:07:18 +01:00
|
|
|
OBJS= analyze.o gram.o keywords.o parser.o parse_agg.o parse_clause.o \
|
|
|
|
parse_expr.o parse_func.o parse_node.o parse_oper.o parse_relation.o \
|
1998-05-10 01:24:27 +02:00
|
|
|
parse_type.o parse_coerce.o parse_target.o scan.o scansup.o
|
1996-10-27 10:55:05 +01:00
|
|
|
|
|
|
|
|
2000-07-19 18:30:27 +02:00
|
|
|
all: SUBSYS.o
|
1996-10-27 10:55:05 +01:00
|
|
|
|
2000-07-19 18:30:27 +02:00
|
|
|
SUBSYS.o: $(OBJS)
|
|
|
|
$(LD) $(LDREL) $(LDOUT) $@ $^
|
2000-07-14 17:32:04 +02:00
|
|
|
|
2000-07-19 18:30:27 +02:00
|
|
|
$(srcdir)/gram.c $(srcdir)/parse.h: gram.y
|
2000-06-07 18:27:00 +02:00
|
|
|
$(YACC) -d $(YFLAGS) $<
|
2000-07-19 18:30:27 +02:00
|
|
|
mv y.tab.c $(srcdir)/gram.c
|
|
|
|
mv y.tab.h $(srcdir)/parse.h
|
1996-10-27 10:55:05 +01:00
|
|
|
|
2000-07-19 18:30:27 +02:00
|
|
|
$(srcdir)/scan.c: scan.l
|
2000-06-07 18:27:00 +02:00
|
|
|
$(LEX) $(LFLAGS) $<
|
2000-07-19 18:30:27 +02:00
|
|
|
mv lex.yy.c $@
|
|
|
|
|
1996-10-27 10:55:05 +01:00
|
|
|
|
2000-07-19 18:30:27 +02:00
|
|
|
analyze.o keywords.o parse_clause.o parse_expr.o scan.o: $(srcdir)/parse.h
|
|
|
|
|
|
|
|
|
|
|
|
# gram.c, parse.h, and scan.c are in the distribution tarball, so they
|
|
|
|
# are not cleaned here.
|
|
|
|
clean:
|
|
|
|
rm -f SUBSYS.o $(OBJS)
|
|
|
|
# And the garbage that might have been left behind by partial build:
|
|
|
|
@rm -f y.tab.c y.tab.h lex.yy.c
|
1996-10-27 10:55:05 +01:00
|
|
|
|
|
|
|
|
|
|
|
# This is unusual: We actually have to build some of the parts before
|
|
|
|
# we know what the header file dependencies are.
|
1998-04-06 02:32:26 +02:00
|
|
|
dep depend: gram.c scan.c
|
|
|
|
$(CC) -MM $(CFLAGS) *.c >depend
|
1996-10-27 10:55:05 +01:00
|
|
|
|
|
|
|
ifeq (depend,$(wildcard depend))
|
|
|
|
include depend
|
|
|
|
endif
|