setup.py: Install the pkg-config file
[pygobject.git] / Makefile.am
blob0fbf3ccde91a9630a0ce8d0585de1481f037fc6a
1 # Part of the gi subdirectory is handled with non-recursive make to avoid
2 # py-compile getting confused between gi/types.py and Python's standard
3 # types module.
4 SUBDIRS = . examples gi tests pygtkcompat
6 PLATFORM_VERSION = 3.0
8 CLEANFILES = \
9         `find "$(builddir)" -type f -name "*.pyc" -print`
11 EXTRA_DIST = \
12         autogen.sh \
13         pygobject.doap \
14         pygobject-$(PLATFORM_VERSION).pc.in \
15         PKG-INFO \
16         PKG-INFO.in \
17         tools/pygi-convert.sh \
18         m4/python.m4 \
19         m4/introspection.m4 \
20         setup.py \
21         setup.cfg \
22         MANIFEST.in \
23         README.rst \
24         docs
26 MAINTAINERCLEANFILES = \
27         $(srcdir)/aclocal.m4 \
28         $(srcdir)/autoscan.log \
29         $(srcdir)/compile \
30         $(srcdir)/config.guess \
31         $(srcdir)/config.h.in \
32         $(srcdir)/config.sub \
33         $(srcdir)/configure.scan \
34         $(srcdir)/depcomp \
35         $(srcdir)/install-sh \
36         $(srcdir)/ltmain.sh \
37         $(srcdir)/missing \
38         $(srcdir)/mkinstalldirs \
39         $(srcdir)/omf.make \
40         $(srcdir)/xmldocs.make \
41         $(srcdir)/gtk-doc.make \
42         $(srcdir)/ChangeLog \
43         $(srcdir)/py-compile \
44         $(srcdir)/m4/libtool.m4 \
45         $(srcdir)/m4/ltoptions.m4 \
46         $(srcdir)/m4/ltsugar.m4 \
47         $(srcdir)/m4/ltversion.m4 \
48         $(srcdir)/m4/lt~obsolete.m4 \
49         `find "$(srcdir)" -type f -name Makefile.in -print` \
50         `find "$(builddir)" -type f -name "*.pyc" -print`
52 BUILT_EXTRA_DIST =              \
53         ChangeLog
55 nobase_pyexec_PYTHON = \
56         gi/__init__.py \
57         gi/types.py \
58         gi/module.py \
59         gi/importer.py \
60         gi/pygtkcompat.py \
61         gi/docstring.py \
62         gi/_constants.py \
63         gi/_propertyhelper.py \
64         gi/_signalhelper.py \
65         gi/_option.py \
66         gi/_error.py \
67         gi/_ossighelper.py
69 # if we build in a separate tree, we need to symlink the *.py files from the
70 # source tree; Python does not accept the extensions and modules in different
71 # paths
72 build_pylinks:
73         for f in $(nobase_pyexec_PYTHON); do \
74                 [ -e $(builddir)/$$f ] || \
75                         $(LN_S) $(abs_srcdir)/$$f $(builddir)/$$f; \
76         done
78 all-local: build_pylinks
80 check-local: build_pylinks
82 if WITH_COMMON
83 # pkg-config files
84 pkgconfigdir = $(libdir)/pkgconfig
85 pkgconfig_DATA = pygobject-$(PLATFORM_VERSION).pc
86 endif
88 # python
89 pyexec_LTLIBRARIES =
91 EGG_NAME = $(PACKAGE)-$(PACKAGE_VERSION)-py$(PYTHON_VERSION)
92 install-data-local:
93         $(mkinstalldirs) $(DESTDIR)$(pyexecdir)
94         cp $(top_builddir)/PKG-INFO $(DESTDIR)$(pyexecdir)/$(EGG_NAME).egg-info
95 uninstall-local:
96         rm -f $(DESTDIR)$(pyexecdir)/$(EGG_NAME).egg-info
98 release-news:
99         printf "%s - %s\n\n" "$(VERSION)" "`LC_TIME=C date -I`" > NEWS.tmp
101         @echo -e "\n\n\nFor blogging, you can copy&paste this HTML formatted news:"
102         @echo "-------------- 8< -------------"
103         @last=`head -n1 $(top_srcdir)/NEWS | cut -f1 -d' '`; \
104         echo "<ul>"; \
105         for commit in `git rev-list $$last..`; do \
106            data=`git log --format="format:%s%n%an%n%b" $$commit^..$$commit`; \
107            echo "$$data" | perl -e '$$subj = <>; chomp $$subj; $$author = <>; chomp $$author; while (<>) { if (/bugzilla.gnome.org.*id=([0-9]+)/) { $$bug = $$1 }};  print "  <li>$$subj ($$author)"; if ($$bug) { print " (<a href=\"https://bugzilla.gnome.org/show_bug.cgi?id=$$bug\">#$$bug</a>)"; }; print "</li>\n"'; \
108            echo "$$data" | perl -e '$$subj = <>; chomp $$subj; $$author = <>; chomp $$author; while (<>) { if (/bugzilla.gnome.org.*id=([0-9]+)/) { $$bug = $$1 }};  print "* $$subj ($$author)"; if ($$bug) { print " (#$$bug)"; }; print "\n"' >> NEWS.tmp; \
109         done
110         @echo "</ul>"
111         @echo "-------------- 8< -------------"
113         @echo >> NEWS.tmp
114         @cat $(top_srcdir)/NEWS >> NEWS.tmp
115         @mv NEWS.tmp $(top_srcdir)/NEWS
117 .PHONY: ChangeLog release-news
119 ChangeLog:
120         @echo Creating $@
121         @if test -d "$(srcdir)/.git"; then \
122           (GIT_DIR=$(top_srcdir)/.git $(top_srcdir)/missing --run git log PYGOBJECT_2_17_0^^.. --stat) | fmt --split-only > $@.tmp \
123           && mv -f $@.tmp $@ \
124           || ($(RM) $@.tmp; \
125               echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \
126               (test -f $@ || echo git-log is required to generate this file >> $@)); \
127         else \
128           test -f $@ || \
129           (echo A git checkout and git-log is required to generate ChangeLog >&2 && \
130           echo A git checkout and git-log is required to generate this file >> $@); \
131         fi
134 distclean-local:
135         if test $(srcdir) = .; then :; else \
136             rm -f $(BUILT_EXTRA_DIST); \
137         fi
139 dist-hook: $(BUILT_EXTRA_DIST)
140         files='$(BUILT_EXTRA_DIST)'; \
141         for f in $$files; do \
142           if test -f $$f; then d=.; else d=$(srcdir); fi; \
143           rm -f $(distdir)/$$f && cp $$d/$$f $(distdir) || exit 1; done
144         rm -rf "$(distdir)/docs/_build"
146 check.quality:
147         (cd $(abs_top_srcdir) && $(PYTHON) -m flake8);
149 check.gdb:
150         cd tests && $(MAKE) check.gdb
152 check.nemiver:
153         cd tests && $(MAKE) check.nemiver
155 check.valgrind:
156         cd tests && $(MAKE) check.valgrind
158 check.valgrindlog:
159         cd tests && $(MAKE) check.valgrindlog
161 check.valgrindxml:
162         cd tests && $(MAKE) check.valgrindxml
164 @CODE_COVERAGE_RULES@