5 top_builddir
= ..
/..
/..
6 include $(top_builddir
)/src
/Makefile.global
8 ifeq ($(perl_useshrplib
),true
)
11 ifeq ($(perl_useshrplib
),yes
)
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_lib
:= $(basename $(notdir $(wildcard $(perl_archlibexp
)/CORE
/perl
[5-9]*.lib
)))
23 perl_embed_ldflags
= -L
$(perl_archlibexp
)/CORE
-l
$(perl_lib
)
24 override CPPFLAGS
+= -DPLPERL_HAVE_UID_GID
25 # Perl on win32 contains /* within comment all over the header file,
26 # so disable this warning.
27 override CFLAGS
+= -Wno-comment
30 override CPPFLAGS
:= -I
$(srcdir) $(CPPFLAGS
) -I
$(perl_archlibexp
)/CORE
32 rpathdir
= $(perl_archlibexp
)/CORE
37 OBJS
= plperl.o spi_internal.o SPI.o
39 SHLIB_LINK
= $(perl_embed_ldflags
)
41 REGRESS_OPTS
= --dbname
=$(PL_TESTDB
) --load-language
=plperl
42 REGRESS
= plperl plperl_trigger plperl_shared plperl_elog
43 # where to find psql for running the tests
46 include $(top_srcdir
)/src
/Makefile.shlib
52 $(PERL
) $(perl_privlibexp
)/ExtUtils
/xsubpp
-typemap
$(perl_privlibexp
)/ExtUtils
/typemap
$< >$@
54 install: all installdirs install-lib
56 installdirs: installdirs-lib
58 uninstall: uninstall-lib
61 $(top_builddir
)/src
/test/regress
/pg_regress
--inputdir
=$(srcdir) --psqldir
=$(PSQLDIR
) $(REGRESS_OPTS
) $(REGRESS
)
65 $(MAKE
) -C
$(top_builddir
)/src
/test/regress pg_regress
$(X
)
67 clean distclean maintainer-clean
: clean-lib
70 rm -f regression.diffs regression.out
76 echo
"*** Cannot build PL/Perl because libperl is not a shared library."; \
77 echo
"*** You might have to rebuild your Perl installation. Refer to"; \
78 echo
"*** the documentation for details."; \