1998-09-25 17:50:02 +02:00
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# Makefile
|
|
|
|
# Makefile for the plpgsql shared object
|
|
|
|
#
|
|
|
|
# IDENTIFICATION
|
2000-06-07 18:27:00 +02:00
|
|
|
# $Header: /cvsroot/pgsql/src/pl/plpgsql/src/Attic/Makefile.in,v 1.25 2000/06/07 16:26:54 petere Exp $
|
1998-09-25 17:50:02 +02:00
|
|
|
#
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
|
1998-10-19 02:00:51 +02:00
|
|
|
NAME= plpgsql
|
|
|
|
SO_MAJOR_VERSION= 1
|
|
|
|
SO_MINOR_VERSION= 0
|
1998-09-25 17:50:02 +02:00
|
|
|
|
2000-06-07 00:01:15 +02:00
|
|
|
SRCDIR= ../../..
|
1998-09-25 17:50:02 +02:00
|
|
|
include $(SRCDIR)/Makefile.global
|
1998-10-09 01:45:19 +02:00
|
|
|
|
1999-03-21 03:27:47 +01:00
|
|
|
# If using flex, ask for a case-insensitive, lex-compatible lexer.
|
|
|
|
ifneq (,$(findstring flex,$(LEX)))
|
1998-10-19 02:00:51 +02:00
|
|
|
LFLAGS+= -i -l
|
1999-03-21 03:27:47 +01:00
|
|
|
endif
|
2000-02-23 23:24:46 +01:00
|
|
|
# bsdi calls flex lex
|
|
|
|
ifeq ($(PORTNAME), bsdi)
|
|
|
|
LFLAGS+= -i -l
|
|
|
|
endif
|
1998-09-25 17:50:02 +02:00
|
|
|
|
1998-10-19 02:00:51 +02:00
|
|
|
OBJS= pl_parse.o pl_handler.o pl_comp.o pl_exec.o pl_funcs.o
|
1998-10-09 18:57:10 +02:00
|
|
|
|
1998-10-19 02:00:51 +02:00
|
|
|
# Shared library stuff, also default 'all' target
|
|
|
|
include $(SRCDIR)/Makefile.shlib
|
1998-09-25 17:50:02 +02:00
|
|
|
|
|
|
|
|
1998-10-19 02:00:51 +02:00
|
|
|
# In order to use Makefile.shlib, we allow it to build a static library
|
|
|
|
# libplpgsql.a, which we just ignore, as well as a shared library that
|
|
|
|
# it will insist on naming $(shlib). We don't want to call it that when
|
|
|
|
# installed, however, so we ignore the install-shlib rule and do this
|
|
|
|
# instead:
|
1998-09-25 17:50:02 +02:00
|
|
|
|
1998-10-19 02:00:51 +02:00
|
|
|
install: $(shlib)
|
1998-10-30 16:05:23 +01:00
|
|
|
ifneq ($(shlib),)
|
1998-10-19 02:00:51 +02:00
|
|
|
$(INSTALL) $(INSTL_SHLIB_OPTS) $(shlib) $(LIBDIR)/plpgsql$(DLSUFFIX)
|
1998-10-30 16:05:23 +01:00
|
|
|
else
|
|
|
|
@echo "plpgsql not installed due to lack of shared library support."
|
|
|
|
endif
|
1998-09-25 17:50:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
pl_handler.o: pl_handler.c plpgsql.h pl.tab.h
|
|
|
|
|
|
|
|
pl_comp.o: pl_comp.c plpgsql.h pl.tab.h
|
|
|
|
|
|
|
|
pl_exec.o: pl_exec.c plpgsql.h pl.tab.h
|
|
|
|
|
|
|
|
pl_funcs.o: pl_funcs.c plpgsql.h pl.tab.h
|
|
|
|
|
|
|
|
pl_parse.o: pl_gram.c pl_scan.c plpgsql.h
|
|
|
|
$(CC) $(CFLAGS) -c -o $@ pl_gram.c
|
|
|
|
|
1999-03-20 19:00:38 +01:00
|
|
|
pl_gram.c pl.tab.h: gram.y
|
2000-06-07 18:27:00 +02:00
|
|
|
$(YACC) -d $(YFLAGS) $<
|
1999-03-20 19:00:38 +01:00
|
|
|
sed -e 's/yy/plpgsql_yy/g' -e 's/YY/PLPGSQL_YY/g' <y.tab.c >pl_gram.c
|
1998-09-25 17:50:02 +02:00
|
|
|
sed -e 's/yy/plpgsql_yy/g' -e 's/YY/PLPGSQL_YY/g' <y.tab.h >pl.tab.h
|
1999-03-20 19:00:38 +01:00
|
|
|
rm -f y.tab.c y.tab.h
|
1998-09-25 17:50:02 +02:00
|
|
|
|
1999-03-20 19:00:38 +01:00
|
|
|
pl_scan.c: scan.l
|
1999-03-21 03:27:47 +01:00
|
|
|
$(LEX) $(LFLAGS) $<
|
1999-03-20 19:00:38 +01:00
|
|
|
sed -e 's/yy/plpgsql_yy/g' -e 's/YY/PLPGSQL_YY/g' <lex.yy.c >pl_scan.c
|
|
|
|
rm -f lex.yy.c
|
1998-10-19 02:00:51 +02:00
|
|
|
|
|
|
|
|
1998-10-30 16:05:23 +01:00
|
|
|
.PHONY: install clean
|
1998-10-19 02:00:51 +02:00
|
|
|
|
1999-07-01 01:57:31 +02:00
|
|
|
clean: clean-shlib
|
|
|
|
rm -f lib$(NAME).a
|
2000-01-16 21:05:00 +01:00
|
|
|
rm -f *.o
|
1999-03-20 19:00:38 +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
|