mirror of
https://github.com/postgres/postgres.git
synced 2025-07-05 07:21:24 +03:00
Simplify make files, add full dependencies.
This commit is contained in:
58
src/backend/parser/Makefile
Normal file
58
src/backend/parser/Makefile
Normal file
@ -0,0 +1,58 @@
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Makefile--
|
||||
# Makefile for parser
|
||||
#
|
||||
# IDENTIFICATION
|
||||
# $Header: /cvsroot/pgsql/src/backend/parser/Makefile,v 1.1 1996/10/27 09:49:05 bryanh Exp $
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
SRCDIR = ../..
|
||||
include ../../Makefile.global
|
||||
|
||||
INCLUDE_OPT = -I.. \
|
||||
-I../port/$(PORTNAME) \
|
||||
-I../include \
|
||||
-I../../include
|
||||
|
||||
CFLAGS+=$(INCLUDE_OPT)
|
||||
|
||||
OBJS = analyze.o catalog_utils.o dbcommands.o gram.o \
|
||||
keywords.o parser.o parse_query.o scan.o scansup.o sysfunc.o
|
||||
|
||||
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.
|
||||
dep: gram.c scan.c
|
||||
$(CC) -MM $(INCLUDE_OPT) *.c >depend
|
||||
|
||||
clean:
|
||||
rm -f SUBSYS.o $(OBJS) gram.c parse.h scan.c
|
||||
# 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
|
||||
|
@ -1,45 +0,0 @@
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Makefile.inc--
|
||||
# Makefile for the parser module
|
||||
#
|
||||
# Copyright (c) 1994, Regents of the University of California
|
||||
#
|
||||
#
|
||||
# IDENTIFICATION
|
||||
# $Header: /cvsroot/pgsql/src/backend/parser/Attic/Makefile.inc,v 1.5 1996/09/26 15:40:45 momjian Exp $
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
VPATH:= $(VPATH):$(CURDIR)/parser
|
||||
|
||||
PARSEYACCS= gram.c parse.h
|
||||
#PARSEYACCS= gram.c
|
||||
|
||||
$(PARSEYACCS): gram.y
|
||||
$(YACC) $(YFLAGS) $<
|
||||
mv y.tab.c $(objdir)/gram.c
|
||||
mv y.tab.h $(objdir)/parse.h
|
||||
|
||||
$(objdir)/gram.o: gram.c
|
||||
$(cc_inobjdir)
|
||||
|
||||
|
||||
scan.c: scan.l
|
||||
cd $(objdir); $(LEX) $<; mv lex.yy.c scan.c
|
||||
|
||||
$(objdir)/scan.o: scan.c
|
||||
$(cc_inobjdir)
|
||||
|
||||
|
||||
SRCS_PARSER+= analyze.c catalog_utils.c dbcommands.c gram.c \
|
||||
keywords.c parser.c parse_query.c scan.c scansup.c sysfunc.c
|
||||
|
||||
CLEANFILES+= scan.c ${PARSEYACCS}
|
||||
|
||||
POSTGRES_DEPEND+= scan.c $(PARSEYACCS)
|
||||
|
||||
HEADERS+= catalog_utils.h io.h parse_query.h parsetree.h \
|
||||
dbcommands.h keywords.h sysfunc.c
|
||||
|
||||
|
Reference in New Issue
Block a user