1998-09-25 17:50:02 +02:00
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
#
|
2011-03-05 03:51:14 +01:00
|
|
|
# Makefile for the pl/pgsql procedural language
|
1998-09-25 17:50:02 +02:00
|
|
|
#
|
2010-09-20 22:08:53 +02:00
|
|
|
# src/pl/plpgsql/src/Makefile
|
1998-09-25 17:50:02 +02:00
|
|
|
#
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
|
2000-06-20 18:40:19 +02:00
|
|
|
subdir = src/pl/plpgsql/src
|
2000-06-27 02:32:06 +02:00
|
|
|
top_builddir = ../../../..
|
|
|
|
include $(top_builddir)/src/Makefile.global
|
2000-06-20 18:40:19 +02:00
|
|
|
|
|
|
|
# Shared library parameters
|
1998-10-19 02:00:51 +02:00
|
|
|
NAME= plpgsql
|
2000-06-20 18:40:19 +02:00
|
|
|
|
2009-08-28 22:26:19 +02:00
|
|
|
override CPPFLAGS := -I. -I$(srcdir) $(CPPFLAGS)
|
2008-04-07 16:15:58 +02:00
|
|
|
SHLIB_LINK = $(filter -lintl, $(LIBS))
|
2007-02-09 16:56:00 +01:00
|
|
|
rpath =
|
2001-04-04 23:15:56 +02:00
|
|
|
|
2009-11-12 01:13:00 +01:00
|
|
|
OBJS = pl_gram.o pl_handler.o pl_comp.o pl_exec.o pl_funcs.o pl_scanner.o
|
1998-10-09 18:57:10 +02:00
|
|
|
|
2011-03-05 03:51:14 +01:00
|
|
|
DATA = plpgsql.control plpgsql--1.0.sql plpgsql--unpackaged--1.0.sql
|
|
|
|
|
2000-06-28 20:30:16 +02:00
|
|
|
all: all-lib
|
|
|
|
|
|
|
|
# Shared library stuff
|
2000-06-27 02:32:06 +02:00
|
|
|
include $(top_srcdir)/src/Makefile.shlib
|
1998-09-25 17:50:02 +02:00
|
|
|
|
|
|
|
|
2011-03-06 00:32:06 +01:00
|
|
|
install: all install-lib install-data
|
1998-09-25 17:50:02 +02:00
|
|
|
|
2008-04-07 16:15:58 +02:00
|
|
|
installdirs: installdirs-lib
|
2011-03-05 03:51:14 +01:00
|
|
|
$(MKDIR_P) '$(DESTDIR)$(datadir)/extension'
|
|
|
|
|
|
|
|
uninstall: uninstall-lib uninstall-data
|
|
|
|
|
2011-03-06 00:32:06 +01:00
|
|
|
install-data: installdirs
|
2011-05-01 23:37:07 +02:00
|
|
|
$(INSTALL_DATA) $(addprefix $(srcdir)/, $(DATA)) '$(DESTDIR)$(datadir)/extension/'
|
2011-03-05 03:51:14 +01:00
|
|
|
|
|
|
|
uninstall-data:
|
|
|
|
rm -f $(addprefix '$(DESTDIR)$(datadir)/extension'/, $(notdir $(DATA)))
|
1998-09-25 17:50:02 +02:00
|
|
|
|
2011-03-05 03:51:14 +01:00
|
|
|
.PHONY: install-data uninstall-data
|
1998-09-25 17:50:02 +02:00
|
|
|
|
|
|
|
|
2006-03-07 02:03:12 +01:00
|
|
|
# Force these dependencies to be known even without dependency info built:
|
2011-02-04 04:32:49 +01:00
|
|
|
pl_gram.o pl_handler.o pl_comp.o pl_exec.o pl_funcs.o pl_scanner.o: plpgsql.h pl_gram.h plerrcodes.h
|
1998-09-25 17:50:02 +02:00
|
|
|
|
2006-03-07 02:03:12 +01:00
|
|
|
# See notes in src/backend/parser/Makefile about the following two rules
|
1998-09-25 17:50:02 +02:00
|
|
|
|
2009-08-28 22:26:19 +02:00
|
|
|
pl_gram.h: pl_gram.c ;
|
2001-11-16 17:32:33 +01:00
|
|
|
|
2009-08-28 22:26:19 +02:00
|
|
|
pl_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
|
1998-09-25 17:50:02 +02:00
|
|
|
|
2011-02-04 04:32:49 +01:00
|
|
|
# generate plerrcodes.h from src/backend/utils/errcodes.txt
|
|
|
|
plerrcodes.h: $(top_srcdir)/src/backend/utils/errcodes.txt generate-plerrcodes.pl
|
2011-02-04 06:07:08 +01:00
|
|
|
$(PERL) $(srcdir)/generate-plerrcodes.pl $< > $@
|
2000-07-19 18:30:27 +02:00
|
|
|
|
2011-02-04 04:32:49 +01:00
|
|
|
distprep: pl_gram.h pl_gram.c plerrcodes.h
|
|
|
|
|
|
|
|
# pl_gram.c, pl_gram.h and plerrcodes.h are in the distribution tarball,
|
2001-10-09 06:15:38 +02:00
|
|
|
# so they are not cleaned here.
|
2000-06-28 20:30:16 +02:00
|
|
|
clean distclean: clean-lib
|
2001-02-09 02:05:42 +01:00
|
|
|
rm -f $(OBJS)
|
2000-06-20 18:40:19 +02:00
|
|
|
|
|
|
|
maintainer-clean: clean
|
2011-02-04 04:32:49 +01:00
|
|
|
rm -f pl_gram.c pl_gram.h plerrcodes.h
|