diff options
| author | Peter Eisentraut <peter_e@gmx.net> | 2000-06-28 18:30:16 +0000 |
|---|---|---|
| committer | Peter Eisentraut <peter_e@gmx.net> | 2000-06-28 18:30:16 +0000 |
| commit | 44f64dd3eac840866d884269c8011b22d416bf3c (patch) | |
| tree | d4be0830d9d93fc2d66fc0281743f2e7a9cd46f5 /src/interfaces/perl5/GNUmakefile | |
| parent | 5ac1eac2a6355b090d074489f4f11b5b844c3274 (diff) | |
| download | postgresql-44f64dd3eac840866d884269c8011b22d416bf3c.tar.gz | |
Makefile cleanup for interface tree. Now essentially with all the
standard targets and behaviour. Replaced Makefile.in's with
Makefile's and declared the respective variables in Makefile.global.
maintainer-clean target now available at top level, although it does
not work in the backend tree yet.
Cleanup pass over Makefile.shlib, renamed some targets and variables.
The shared library symlink tests are now done by make, not the shell.
ecpg: Remove one warning in sloppy flex output.
PL/Perl and Perl interface: the MakeMaker documentation is confusing,
the realclean target *does* "delete derived files", but it also
uninstalls them. Don't use that.
The submake targets in the various bin directories that update libpq
should `make all', not `make libpq.a'. That is a) unportable, and
b) doesn't build the shared library.
Diffstat (limited to 'src/interfaces/perl5/GNUmakefile')
| -rw-r--r-- | src/interfaces/perl5/GNUmakefile | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/src/interfaces/perl5/GNUmakefile b/src/interfaces/perl5/GNUmakefile new file mode 100644 index 0000000000..ae40e85f38 --- /dev/null +++ b/src/interfaces/perl5/GNUmakefile @@ -0,0 +1,64 @@ +# This file is an interface from the Autoconf world to Perl's +# MakeMaker world, so that the latter behaves (kind of) like the +# former would prefer. Internally, we call Perl to create another +# Makefile according to its own ideas and then invoke the rules from +# that file. +# +# $Header: /cvsroot/pgsql/src/interfaces/perl5/Attic/GNUmakefile,v 1.1 2000/06/28 18:29:56 petere Exp $ + +subdir = src/interfaces/perl5 +top_builddir = ../../.. +include ../../Makefile.global + + +all: Makefile libpq-all + $(MAKE) -f $< all + +Makefile: Makefile.PL + $(PERL) $< POLLUTE=1 + +.PHONY: libpq-all +libpq-all: + $(MAKE) -C $(top_builddir)/src/interfaces/libpq all + +# The klugery here is to ensure that the perl5 shared library gets +# built with the correct path to the installed location of libpq +# during `make install', but is built against the local tree during +# ordinary building and testing. +# +# During install, we must also guard against the likelihood that we +# don't have permissions to install into the Perl module library. The +# purer alternative would naturally be the ability to select the +# installation directory somewhere. + +install: Makefile + $(MAKE) -f Makefile clean + POSTGRES_LIB="$(libdir)" \ + POSTGRES_INCLUDE="$(includedir)" \ + $(PERL) $(srcdir)/Makefile.PL POLLUTE=1 + $(MAKE) -f Makefile all + -@if [ -w "`$(MAKE) --quiet -f Makefile echo-installdir`" ]; then \ + $(MAKE) -f Makefile install; \ + rm -f Makefile; \ + else \ + echo "*****" ;\ + echo "* Skipping the installation of the Perl module for lack of permissions."; \ + echo "* To install it, change to the directory "`pwd`","; \ + echo "* become the appropriate user, and do \`$(MAKE) install'."; \ + echo "*****"; \ + fi + + +uninstall: + @echo "*****"; \ + echo "* The Perl module cannot be uninstalled automatically. You can"; \ + echo "* change into the directory "`pwd`" and do"; \ + echo "*"; \ + echo "* $(MAKE) -f Makefile realclean"; \ + echo "*"; \ + echo "* to delete built and installed files."; \ + echo "*****" + +clean distclean maintainer-clean: + -[ -f Makefile ] && $(MAKE) -f Makefile clean + rm -f Makefile Makefile.old |
