source: trunk/module/GNUmakefile @ 404

Last change on this file since 404 was 404, checked in by cito, 9 years ago

Added SVN keyword "Id".

  • Property svn:keywords set to Id
File size: 1.8 KB
Line 
1# $Header: /usr/cvs/Public/pygresql/module/GNUmakefile,v 1.19 2005-01-11 12:13:38 darcy Exp $
2# $Id: GNUmakefile 404 2010-03-16 21:48:42Z cito $
3
4subdir = src/interfaces/python
5top_builddir = ../../..
6include $(top_builddir)/src/Makefile.global
7
8NAME = _pgmodule
9OBJS = pgmodule.o
10SHLIB_LINK = $(libpq)
11ifeq ($(PORTNAME), cygwin)
12override CPPFLAGS += -DUSE_DL_IMPORT
13SHLIB_LINK += $(python_libspec)
14endif
15
16
17include $(top_srcdir)/src/Makefile.shlib
18
19override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS) $(python_includespec)
20
21all: all-lib
22
23all-lib: libpq-all
24
25.PHONY: libpq-all
26libpq-all:
27        $(MAKE) -C $(libpq_builddir) all
28
29install-warning-msg := { \
30echo "*** Skipping the installation of the Python interface module for lack"; \
31echo "*** of permissions.  To install it, change to the directory"; \
32echo "***     `pwd`,"; \
33echo "*** become the appropriate user, and do '$(MAKE) install'."; }
34
35install: all installdirs
36        @if test -w $(DESTDIR)$(python_moduleexecdir) && test -w $(DESTDIR)$(python_moduledir); then \
37          echo "$(INSTALL_SHLIB) $(shlib) $(DESTDIR)$(python_moduleexecdir)/_pgmodule$(DLSUFFIX)"; \
38          $(INSTALL_SHLIB) $(shlib) $(DESTDIR)$(python_moduleexecdir)/_pgmodule$(DLSUFFIX); \
39        \
40          echo "$(INSTALL_DATA) $(srcdir)/pg.py $(DESTDIR)$(python_moduledir)/pg.py"; \
41          $(INSTALL_DATA) $(srcdir)/pg.py $(DESTDIR)$(python_moduledir)/pg.py; \
42        \
43          echo "$(INSTALL_DATA) $(srcdir)/pgdb.py $(DESTDIR)$(python_moduledir)/pgdb.py"; \
44          $(INSTALL_DATA) $(srcdir)/pgdb.py $(DESTDIR)$(python_moduledir)/pgdb.py; \
45        else \
46          $(install-warning-msg); \
47        fi
48
49installdirs:
50        $(mkinstalldirs) $(DESTDIR)$(python_moduleexecdir) $(DESTDIR)$(python_moduledir)
51
52uninstall:
53        rm -f $(DESTDIR)$(python_moduleexecdir)/_pgmodule$(DLSUFFIX) \
54              $(DESTDIR)$(python_moduledir)/pg.py \
55              $(DESTDIR)$(python_moduledir)/pgdb.py
56
57clean distclean maintainer-clean: clean-lib
58        rm -f $(OBJS)
Note: See TracBrowser for help on using the repository browser.