mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
Moved the intricacies of the perl interface build into its own makefile
that now functions as a wrapper around the MakeMaker stuff. It might even behave sensically when we have separate build dirs. Same for plperl, which of course still doesn't work very well. Made sure that plperl respects the choice of --libdir. Added --with-python to automatically build and install the Python interface. Works similarly to the Perl5 stuff. Moved the burden of the distclean targets lower down into the source tree. Eventually, each make file should have its own. Added automatic remaking of makefiles and configure. Currently only for the top-level because of a bug(?) in Autoconf. Use GNU `missing' to work around missing autoconf and aclocal. Start factoring out macros into their own config/*.m4 files to increase readability and organization.
This commit is contained in:
40
src/pl/plperl/GNUmakefile.in
Normal file
40
src/pl/plperl/GNUmakefile.in
Normal file
@@ -0,0 +1,40 @@
|
||||
# $Header: /cvsroot/pgsql/src/pl/plperl/Attic/GNUmakefile.in,v 1.1 2000/06/10 18:02:11 petere Exp $
|
||||
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
top_srcdir = @top_srcdir@
|
||||
top_builddir = ../../..
|
||||
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
libdir = @libdir@
|
||||
|
||||
plperl_installdir = $(libdir)
|
||||
|
||||
mkinstalldirs = @mkinstalldirs@
|
||||
PERL = @PERL@
|
||||
PGSQL_INCLUDES = @PGSQL_INCLUDES@
|
||||
|
||||
all: Makefile
|
||||
$(MAKE) -f $< all
|
||||
|
||||
Makefile: Makefile.PL
|
||||
@plperl_installdir='$(plperl_installdir)' \
|
||||
EXTRA_INCLUDES='-I$(top_srcdir)/src/include $(PGSQL_INCLUDES)' \
|
||||
$(PERL) $< POLLUTE=1
|
||||
|
||||
install: Makefile installdirs
|
||||
$(MAKE) -f $< install
|
||||
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(plperl_installdir)
|
||||
|
||||
clean:
|
||||
-[ -f Makefile ] && $(MAKE) -f Makefile realclean
|
||||
|
||||
distclean maintainer-clean: clean
|
||||
rm -f GNUmakefile
|
||||
|
||||
|
||||
.PHONY: all install installdirs clean distclean maintainer-clean
|
@@ -15,13 +15,15 @@ if ($Config{'useshrplib'} ne 'true') {
|
||||
# Dummy Makefile for use when we can't build plperl
|
||||
|
||||
all install:
|
||||
@echo "Cannot build plperl because libperl is not a shared library; skipping it."
|
||||
@echo "*****"; \
|
||||
echo "* Cannot build PL/Perl because libperl is not a shared library." ; \
|
||||
echo "* Skipped."; \
|
||||
echo "*****"
|
||||
|
||||
clean distclean:
|
||||
|
||||
clean realclean:
|
||||
rm -f Makefile
|
||||
|
||||
.DEFAULT dep depend:
|
||||
|
||||
EndOfMakefile
|
||||
close(OUT);
|
||||
exit(0);
|
||||
@@ -54,19 +56,11 @@ my $perllib = "-L$Config{archlibexp}/CORE -lperl";
|
||||
|
||||
WriteMakefile( 'NAME' => 'plperl',
|
||||
dynamic_lib => { 'OTHERLDFLAGS' => "$opcode $perllib" } ,
|
||||
INC => '-I$(SRCDIR)/include $(PGSQL_INCLUDES)',
|
||||
INC => "$ENV{EXTRA_INCLUDES}",
|
||||
XS => { 'SPI.xs' => 'SPI.c' },
|
||||
OBJECT => 'plperl.o eloglvl.o SPI.o',
|
||||
);
|
||||
|
||||
sub MY::post_initialize {
|
||||
|
||||
q[
|
||||
SRCDIR=../../../src
|
||||
include $(SRCDIR)/Makefile.global
|
||||
];
|
||||
|
||||
}
|
||||
|
||||
sub MY::cflags {
|
||||
package MY; # so that "SUPER" works right
|
||||
@@ -88,9 +82,9 @@ sub MY::cflags {
|
||||
|
||||
sub MY::install {
|
||||
|
||||
q[
|
||||
qq[
|
||||
install :: all
|
||||
cp $(INST_DYNAMIC) $(LIBDIR)
|
||||
cp \$(INST_DYNAMIC) $ENV{plperl_installdir}
|
||||
];
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user