1996-10-27 10:55:05 +01:00
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# Makefile--
|
|
|
|
# Makefile for parser
|
|
|
|
#
|
|
|
|
# IDENTIFICATION
|
1998-05-13 06:54:16 +02:00
|
|
|
# $Header: /cvsroot/pgsql/src/backend/parser/Makefile,v 1.17 1998/05/13 04:54:16 thomas Exp $
|
1996-10-27 10:55:05 +01:00
|
|
|
#
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
|
1996-11-14 08:33:34 +01:00
|
|
|
SRCDIR= ../..
|
1996-10-27 10:55:05 +01:00
|
|
|
include ../../Makefile.global
|
|
|
|
|
1998-05-13 06:54:16 +02:00
|
|
|
CFLAGS += -I..
|
1997-04-15 19:24:26 +02:00
|
|
|
|
1997-04-18 10:57:39 +02:00
|
|
|
ifeq ($(CC), gcc)
|
1997-04-15 19:24:26 +02:00
|
|
|
CFLAGS+= -Wno-error
|
|
|
|
endif
|
|
|
|
|
1996-10-27 10:55:05 +01:00
|
|
|
|
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
|
|
|
|
|
|
|
all: SUBSYS.o
|
|
|
|
|
|
|
|
SUBSYS.o: $(OBJS)
|
|
|
|
$(LD) -r -o SUBSYS.o $(OBJS)
|
|
|
|
|
|
|
|
gram.c parse.h: gram.y
|
|
|
|
$(YACC) $(YFLAGS) $<
|
|
|
|
mv y.tab.c gram.c
|
|
|
|
mv y.tab.h parse.h
|
|
|
|
|
|
|
|
scan.c: scan.l
|
|
|
|
$(LEX) $<
|
|
|
|
mv lex.yy.c scan.c
|
|
|
|
|
|
|
|
# The following dependencies on parse.h are computed by
|
|
|
|
# make depend, but we state them here explicitly anyway because
|
|
|
|
# parse.h doesn't even exist at first and if user fails to
|
|
|
|
# do make depend, we still want the build to succeed.
|
|
|
|
|
|
|
|
analyze.o keywords.o scan.o: parse.h
|
|
|
|
|
|
|
|
# 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
|
|
|
|
1997-11-14 16:48:19 +01:00
|
|
|
# Remove scan.c from the clean since we want to avoid rebuilding when using
|
|
|
|
# the original source distribution. This should help Solaris machines whose
|
|
|
|
# lex has trouble with exclusive states.
|
1998-02-18 08:37:05 +01:00
|
|
|
# Remove gram.c, parse.h from the clean since we have now started to exceed
|
|
|
|
# internal limits for some non-bison yaccs. - thomas 1998-02-17
|
1996-10-27 10:55:05 +01:00
|
|
|
clean:
|
1998-02-18 08:37:05 +01:00
|
|
|
rm -f SUBSYS.o $(OBJS) # gram.c parse.h # scan.c
|
1996-10-27 10:55:05 +01:00
|
|
|
# And the garbage that might have been left behind by partial build:
|
|
|
|
rm -f y.tab.c y.tab.h lex.yy.c
|
|
|
|
|
|
|
|
ifeq (depend,$(wildcard depend))
|
|
|
|
include depend
|
|
|
|
endif
|
|
|
|
|