Fix obsolete comment regarding FSM truncation.
[PostgreSQL.git] / src / pl / plperl / GNUmakefile
blob09adae550159d104af3b92a0f99629fe4f74708e
1 # Makefile for PL/Perl
2 # $PostgreSQL$
4 subdir = src/pl/plperl
5 top_builddir = ../../..
6 include $(top_builddir)/src/Makefile.global
8 ifeq ($(perl_useshrplib),true)
9 shared_libperl = yes
10 endif
11 ifeq ($(perl_useshrplib),yes)
12 shared_libperl = yes
13 endif
15 # If we don't have a shared library and the platform doesn't allow it
16 # to work without, we have to skip it.
17 ifneq (,$(findstring yes, $(shared_libperl)$(allow_nonpic_in_shlib)))
19 ifeq ($(PORTNAME), win32)
20 perl_archlibexp := $(subst \,/,$(perl_archlibexp))
21 perl_privlibexp := $(subst \,/,$(perl_privlibexp))
22 perl_embed_ldflags = -L$(perl_archlibexp)/CORE -lperl58
23 override CPPFLAGS += -DPLPERL_HAVE_UID_GID
24 # Perl on win32 contains /* within comment all over the header file,
25 # so disable this warning.
26 override CFLAGS += -Wno-comment
27 endif
29 override CPPFLAGS := -I$(srcdir) $(CPPFLAGS) -I$(perl_archlibexp)/CORE
31 rpathdir = $(perl_archlibexp)/CORE
34 NAME = plperl
36 OBJS = plperl.o spi_internal.o SPI.o
38 SHLIB_LINK = $(perl_embed_ldflags)
40 REGRESS_OPTS = --dbname=$(PL_TESTDB) --load-language=plperl
41 REGRESS = plperl plperl_trigger plperl_shared plperl_elog
42 # where to find psql for running the tests
43 PSQLDIR = $(bindir)
45 include $(top_srcdir)/src/Makefile.shlib
48 all: all-lib
50 SPI.c: SPI.xs
51 $(PERL) $(perl_privlibexp)/ExtUtils/xsubpp -typemap $(perl_privlibexp)/ExtUtils/typemap $< >$@
53 install: all installdirs install-lib
55 installdirs: installdirs-lib
57 uninstall: uninstall-lib
59 installcheck: submake
60 $(top_builddir)/src/test/regress/pg_regress --inputdir=$(srcdir) --psqldir=$(PSQLDIR) $(REGRESS_OPTS) $(REGRESS)
62 .PHONY: submake
63 submake:
64 $(MAKE) -C $(top_builddir)/src/test/regress pg_regress$(X)
66 clean distclean maintainer-clean: clean-lib
67 rm -f SPI.c $(OBJS)
68 rm -rf results
69 rm -f regression.diffs regression.out
71 else # can't build
73 all:
74 @echo ""; \
75 echo "*** Cannot build PL/Perl because libperl is not a shared library."; \
76 echo "*** You might have to rebuild your Perl installation. Refer to"; \
77 echo "*** the documentation for details."; \
78 echo ""
80 endif # can't build