1 # Limit PyFlakes and PEP8 to these directories.
2 pycheck_dirs = examples gi tests pygtkcompat
4 # Part of the gi subdirectory is handled with non-recursive make to avoid
5 # py-compile getting confused between gi/types.py and Python's standard
7 SUBDIRS = . $(pycheck_dirs)
12 `find "$(builddir)" -type f -name "*.pyc" -print`
17 pygobject-$(PLATFORM_VERSION).pc.in \
20 tools/pygi-convert.sh \
28 MAINTAINERCLEANFILES = \
29 $(srcdir)/aclocal.m4 \
30 $(srcdir)/autoscan.log \
32 $(srcdir)/config.guess \
33 $(srcdir)/config.h.in \
34 $(srcdir)/config.sub \
35 $(srcdir)/configure.scan \
37 $(srcdir)/install-sh \
40 $(srcdir)/mkinstalldirs \
42 $(srcdir)/xmldocs.make \
43 $(srcdir)/gtk-doc.make \
45 $(srcdir)/py-compile \
46 $(srcdir)/m4/libtool.m4 \
47 $(srcdir)/m4/ltoptions.m4 \
48 $(srcdir)/m4/ltsugar.m4 \
49 $(srcdir)/m4/ltversion.m4 \
50 $(srcdir)/m4/lt~obsolete.m4 \
51 `find "$(srcdir)" -type f -name Makefile.in -print` \
52 `find "$(builddir)" -type f -name "*.pyc" -print`
57 nobase_pyexec_PYTHON = \
65 gi/_propertyhelper.py \
71 # if we build in a separate tree, we need to symlink the *.py files from the
72 # source tree; Python does not accept the extensions and modules in different
75 for f in $(nobase_pyexec_PYTHON); do \
76 [ -e $(builddir)/$$f ] || \
77 $(LN_S) $(abs_srcdir)/$$f $(builddir)/$$f; \
80 all-local: build_pylinks
82 check-local: build_pylinks
86 pkgconfigdir = $(libdir)/pkgconfig
87 pkgconfig_DATA = pygobject-$(PLATFORM_VERSION).pc
93 EGG_NAME = $(PACKAGE)-$(PACKAGE_VERSION)-py$(PYTHON_VERSION)
95 $(mkinstalldirs) $(DESTDIR)$(pyexecdir)
96 cp $(top_builddir)/PKG-INFO $(DESTDIR)$(pyexecdir)/$(EGG_NAME).egg-info
98 rm -f $(DESTDIR)$(pyexecdir)/$(EGG_NAME).egg-info
101 printf "%s - %s\n\n" "$(VERSION)" "`LC_TIME=C date -I`" > NEWS.tmp
103 @echo -e "\n\n\nFor blogging, you can copy&paste this HTML formatted news:"
104 @echo "-------------- 8< -------------"
105 @last=`head -n1 $(top_srcdir)/NEWS | cut -f1 -d' '`; \
107 for commit in `git rev-list $$last..`; do \
108 data=`git log --format="format:%s%n%an%n%b" $$commit^..$$commit`; \
109 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"'; \
110 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; \
113 @echo "-------------- 8< -------------"
116 @cat $(top_srcdir)/NEWS >> NEWS.tmp
117 @mv NEWS.tmp $(top_srcdir)/NEWS
119 .PHONY: ChangeLog release-news
123 @if test -d "$(srcdir)/.git"; then \
124 (GIT_DIR=$(top_srcdir)/.git $(top_srcdir)/missing --run git log PYGOBJECT_2_17_0^^.. --stat) | fmt --split-only > $@.tmp \
127 echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \
128 (test -f $@ || echo git-log is required to generate this file >> $@)); \
131 (echo A git checkout and git-log is required to generate ChangeLog >&2 && \
132 echo A git checkout and git-log is required to generate this file >> $@); \
137 if test $(srcdir) = .; then :; else \
138 rm -f $(BUILT_EXTRA_DIST); \
141 dist-hook: $(BUILT_EXTRA_DIST)
142 files='$(BUILT_EXTRA_DIST)'; \
143 for f in $$files; do \
144 if test -f $$f; then d=.; else d=$(srcdir); fi; \
145 rm -f $(distdir)/$$f && cp $$d/$$f $(distdir) || exit 1; done
146 rm -rf "$(distdir)/docs/_build"
151 @echo " CHECK Pyflakes" $(pycheck_dirs)
152 @if type pyflakes >/dev/null 2>&1; then \
153 (cd $(abs_top_srcdir) && PYFLAKES_BUILTINS="basestring,long,unicode" pyflakes $(pycheck_dirs) ); \
154 else echo "skipped, pyflakes not installed"; \
157 @if type pep8 >/dev/null 2>&1; then \
158 (cd $(abs_top_srcdir) && pep8 --ignore=E501,E123,E124,E402,E731,E722 --repeat --show-source $(pycheck_dirs) ); \
159 else echo "skipped, pep8 not installed"; \
163 cd tests && $(MAKE) check.gdb
166 cd tests && $(MAKE) check.nemiver
169 cd tests && $(MAKE) check.valgrind
172 cd tests && $(MAKE) check.valgrindlog
175 cd tests && $(MAKE) check.valgrindxml
177 @CODE_COVERAGE_RULES@