source: branches/4.x/GNUmakefile @ 711

Last change on this file since 711 was 711, checked in by cito, 3 years ago

Flatten the directory structure of the project

Simplified the directory structure by flattening the "module" subdirectory out
to the root directory. That way, the setup.py script can now also access the
top-level docs subdirectory, so it could also install or build the docs.
There was nothing else in the root directory anyway, except the mkdocs and
mktar scripts which could be made unnecessary through setup.py.

Also made the setup script a bit clearer. Removed the note about MinGW for
Windows since the Microsoft compiler for Python 2.7 and Visual Studio Community
are now freely available including 64bit compilers, and produce less problems.

Note that the usual structure would have been to use a "pygresql" package
directory instead of the "module" directory. But since we install PyGreSQL
as two top-level modules "pg" and "pgdb" instead of a package "pygresql",
the flattened structure reflects that much better. For historical reasons
and people don't want to rewrite import statements, we will keep it that way.

  • 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 711 2016-01-11 08:45:05Z 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.