1997-08-16 16:56:28 -04:00
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
|
#
|
|
|
|
|
# Makefile.inc--
|
|
|
|
|
# Makefile for src/bin (utility programs)
|
|
|
|
|
#
|
|
|
|
|
# Copyright (c) 1994, Regents of the University of California
|
|
|
|
|
#
|
|
|
|
|
#
|
|
|
|
|
# IDENTIFICATION
|
1999-12-15 20:25:23 -05:00
|
|
|
# $Header: /cvsroot/pgsql/src/interfaces/Makefile,v 1.31 1999/12/16 01:25:15 momjian Exp $
|
1997-08-16 16:56:28 -04:00
|
|
|
#
|
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
|
|
1997-09-16 14:47:36 -04:00
|
|
|
SRCDIR= ..
|
|
|
|
|
include $(SRCDIR)/Makefile.global
|
1997-08-16 16:56:28 -04:00
|
|
|
|
1998-08-16 23:50:43 -04:00
|
|
|
|
1998-10-17 22:34:34 -04:00
|
|
|
# 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
|
1998-10-27 16:27:36 -05:00
|
|
|
# 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.
|
1998-08-16 23:50:43 -04:00
|
|
|
|
1998-10-16 00:37:38 -04:00
|
|
|
.DEFAULT all install clean dep depend distclean:
|
1997-08-16 16:56:28 -04:00
|
|
|
$(MAKE) -C libpq $@
|
1998-08-26 12:43:54 -04:00
|
|
|
$(MAKE) -C ecpg $@
|
1997-08-16 16:56:28 -04:00
|
|
|
ifeq ($(HAVE_Cplusplus), true)
|
|
|
|
|
$(MAKE) -C libpq++ $@
|
1997-09-16 14:47:36 -04:00
|
|
|
else
|
|
|
|
|
echo $(HAVE_Cplusplus): No C++
|
1997-08-16 16:56:28 -04:00
|
|
|
endif
|
1999-10-11 14:05:39 -04:00
|
|
|
$(MAKE) -C libpgeasy $@
|
1997-08-16 16:56:28 -04:00
|
|
|
ifeq ($(USE_TCL), true)
|
|
|
|
|
$(MAKE) -C libpgtcl $@
|
|
|
|
|
endif
|
1997-10-29 23:38:30 -05:00
|
|
|
ifeq ($(USE_PERL), true)
|
1998-10-17 22:34:34 -04:00
|
|
|
if [ "$@" = "install" ]; then \
|
|
|
|
|
$(MAKE) $(MFLAGS) install-perl5; \
|
|
|
|
|
else \
|
|
|
|
|
$(MAKE) $(MFLAGS) perl5/Makefile; \
|
|
|
|
|
$(MAKE) $(MFLAGS) -C perl5 $@; \
|
|
|
|
|
fi
|
1997-10-29 23:38:30 -05:00
|
|
|
endif
|
1998-10-07 02:41:40 -04:00
|
|
|
ifeq ($(USE_ODBC), true)
|
|
|
|
|
$(MAKE) -C odbc $@
|
|
|
|
|
endif
|
1998-08-16 23:50:43 -04:00
|
|
|
|
|
|
|
|
perl5/Makefile: perl5/Makefile.PL
|
1999-10-07 20:15:49 -04:00
|
|
|
cd perl5 && $(PERL) Makefile.PL
|
1998-10-17 22:34:34 -04:00
|
|
|
|
1998-12-18 12:53:22 -05:00
|
|
|
install-perl5: perl5/Makefile
|
1998-10-17 22:34:34 -04:00
|
|
|
$(MAKE) -C perl5 clean
|
1999-10-08 00:28:57 -04:00
|
|
|
cd perl5 && POSTGRES_HOME="$(POSTGRESDIR)" $(PERL) Makefile.PL
|
1998-10-27 16:27:36 -05:00
|
|
|
$(MAKE) -C perl5 all
|
1999-12-15 20:25:23 -05:00
|
|
|
-@if [ -w `sed -n -e 's/^ *INSTALLSITELIB *= *//p' perl5/Makefile` ]; then \
|
1998-10-27 16:27:36 -05:00
|
|
|
$(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
|
1998-10-17 22:34:34 -04:00
|
|
|
|
|
|
|
|
.PHONY: install-perl5
|