1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#-------------------------------------------------------------------------
#
# Makefile.inc--
# Makefile for src/bin (utility programs)
#
# Copyright (c) 1994, Regents of the University of California
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/interfaces/Makefile,v 1.31 1999/12/16 01:25:15 momjian Exp $
#
#-------------------------------------------------------------------------
SRCDIR= ..
include $(SRCDIR)/Makefile.global
# Note: the klugery for perl5 is to ensure that the perl5 shared lib
# 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.
.DEFAULT all install clean dep depend distclean:
$(MAKE) -C libpq $@
$(MAKE) -C ecpg $@
ifeq ($(HAVE_Cplusplus), true)
$(MAKE) -C libpq++ $@
else
echo $(HAVE_Cplusplus): No C++
endif
$(MAKE) -C libpgeasy $@
ifeq ($(USE_TCL), true)
$(MAKE) -C libpgtcl $@
endif
ifeq ($(USE_PERL), true)
if [ "$@" = "install" ]; then \
$(MAKE) $(MFLAGS) install-perl5; \
else \
$(MAKE) $(MFLAGS) perl5/Makefile; \
$(MAKE) $(MFLAGS) -C perl5 $@; \
fi
endif
ifeq ($(USE_ODBC), true)
$(MAKE) -C odbc $@
endif
perl5/Makefile: perl5/Makefile.PL
cd perl5 && $(PERL) Makefile.PL
install-perl5: perl5/Makefile
$(MAKE) -C perl5 clean
cd perl5 && POSTGRES_HOME="$(POSTGRESDIR)" $(PERL) Makefile.PL
$(MAKE) -C perl5 all
-@if [ -w `sed -n -e 's/^ *INSTALLSITELIB *= *//p' perl5/Makefile` ]; then \
$(MAKE) $(MFLAGS) -C perl5 install; \
rm -f perl5/Makefile; \
else \
echo "Skipping install of Perl module for lack of permissions."; \
echo "To install it, cd into interfaces/perl5, su to become the"; \
echo "appropriate user, and do '$(MAKE) install'."; \
fi
.PHONY: install-perl5