]> granicus.if.org Git - postgresql/blob - src/pl/Makefile
plperl Makefile cleanup. Doesn't work on BSDI yet.
[postgresql] / src / pl / Makefile
1 #-------------------------------------------------------------------------
2 #
3 # Makefile
4 #    Makefile for src/pl (procedural languages)
5 #
6 # Copyright (c) 1994, Regents of the University of California
7 #
8 #
9 # IDENTIFICATION
10 #    $Header: /cvsroot/pgsql/src/pl/Makefile,v 1.3 2000/01/20 23:00:39 momjian Exp $
11 #
12 #-------------------------------------------------------------------------
13
14 SRCDIR= ..
15 include $(SRCDIR)/Makefile.global
16
17
18 .DEFAULT all install clean dep depend distclean:
19         $(MAKE) -C plpgsql $@
20 ifeq ($(USE_TCL), true)
21         $(MAKE) -C tcl $@
22 endif
23 ifeq ($(USE_PERL), true)
24         -@if [ "$@" = "install" ]; then \
25                 $(MAKE) $(MFLAGS) install-plperl; \
26         else \
27                 $(MAKE) $(MFLAGS) plperl/Makefile; \
28                 $(MAKE) $(MFLAGS) -C plperl $@; \
29         fi
30 endif
31
32 plperl/Makefile: plperl/Makefile.PL
33         cd plperl && $(PERL) Makefile.PL
34
35 install-plperl: plperl/Makefile
36         $(MAKE) -C plperl clean
37         cd plperl && POSTGRES_HOME="$(POSTGRESDIR)" $(PERL) Makefile.PL
38         $(MAKE) -C plperl all
39         -@if [ -w `sed -n -e 's/^ *INSTALLSITELIB *= *//p' plperl/Makefile` ]; then \
40                 $(MAKE) $(MFLAGS) -C plperl install; \
41                 rm -f plperl/Makefile; \
42         else \
43                 echo "Skipping install of Perl module for lack of permissions."; \
44                 echo "To install it, cd into interfaces/plperl, su to become the"; \
45                 echo "appropriate user, and do '$(MAKE) install'."; \
46         fi
47
48 .PHONY: install-plperl
49