postgresql/src/interfaces/Makefile

66 lines
1.9 KiB
Makefile
Raw Normal View History

#-------------------------------------------------------------------------
#
# 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 $
#
#-------------------------------------------------------------------------
1997-09-16 14:47:36 -04:00
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.
1998-10-16 00:37:38 -04:00
.DEFAULT all install clean dep depend distclean:
$(MAKE) -C libpq $@
$(MAKE) -C ecpg $@
ifeq ($(HAVE_Cplusplus), true)
$(MAKE) -C libpq++ $@
1997-09-16 14:47:36 -04:00
else
echo $(HAVE_Cplusplus): No C++
endif
1999-10-11 14:05:39 -04:00
$(MAKE) -C libpgeasy $@
ifeq ($(USE_TCL), true)
$(MAKE) -C libpgtcl $@
endif
1997-10-29 23:38:30 -05:00
ifeq ($(USE_PERL), true)
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
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