1 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
4 # Limit PyFlakes and PEP8 to these directories.
5 pycheck_dirs = examples gi tests pygtkcompat
7 # Part of the gi subdirectory is handled with non-recursive make to avoid
8 # py-compile getting confused between gi/types.py and Python's standard
10 SUBDIRS = . $(pycheck_dirs)
12 PLATFORM_VERSION = 3.0
15 `find "$(builddir)" -type f -name "*.pyc" -print`
20 pygobject-$(PLATFORM_VERSION).pc.in \
28 MAINTAINERCLEANFILES = \
30 $(srcdir)/aclocal.m4 \
31 $(srcdir)/autoscan.log \
33 $(srcdir)/config.guess \
34 $(srcdir)/config.h.in \
35 $(srcdir)/config.sub \
36 $(srcdir)/configure.scan \
38 $(srcdir)/install-sh \
41 $(srcdir)/mkinstalldirs \
43 $(srcdir)/xmldocs.make \
44 $(srcdir)/gtk-doc.make \
46 $(srcdir)/py-compile \
47 $(srcdir)/m4/libtool.m4 \
48 $(srcdir)/m4/ltoptions.m4 \
49 $(srcdir)/m4/ltsugar.m4 \
50 $(srcdir)/m4/ltversion.m4 \
51 $(srcdir)/m4/lt~obsolete.m4 \
52 `find "$(srcdir)" -type f -name Makefile.in -print` \
53 `find "$(builddir)" -type f -name "*.pyc" -print`
58 nobase_pyexec_PYTHON = \
66 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
95 EGG_NAME = $(PACKAGE)-$(PACKAGE_VERSION)-py$(PYTHON_VERSION)-$(PLATFORM)
98 $(mkinstalldirs) $(DESTDIR)$(pyexecdir)
99 cp $(top_builddir)/PKG-INFO $(DESTDIR)$(pyexecdir)/$(EGG_NAME).egg-info
101 $(mkinstalldirs) $(DESTDIR)$(pyexecdir)
103 rm -f $(DESTDIR)$(pyexecdir)/$(EGG_NAME).egg-info
105 egg: EGG_TMPDIR:=$(TMPDIR)/$(PACKAGE)-$(PACKAGE_VERSION)
106 egg: $(top_srcdir)/gobject/gobject.la PKG-INFO
109 $(MKDIR_P) $(EGG_TMPDIR)
110 $(MKDIR_P) $(EGG_TMPDIR)/EGG-INFO
111 $(MAKE) -C gobject install-pkgpyexecLTLIBRARIES pkgpyexecdir=$(EGG_TMPDIR)
112 rm -fr $(EGG_TMPDIR)/gobject.la
113 $(INSTALL) PKG-INFO $(EGG_TMPDIR)/EGG-INFO
114 echo "gobject.so" >> $(EGG_TMPDIR)/EGG-INFO/native_libs.txt
115 ( echo "gobject" ) >> $(EGG_TMPDIR)/EGG-INFO/top_level.txt
116 cd $(EGG_TMPDIR) && zip -rq $(EGG_NAME).egg .
117 mv $(EGG_TMPDIR)/$(EGG_NAME).egg .
122 cp -r docs/html/*.html pygobject
123 cp -r docs/html/*.sgml pygobject
124 cp -r docs/html/*.devhelp pygobject
125 cp -r docs/style.css pygobject
126 tar cfz $(PACKAGE)-docs.tar.gz pygobject
130 printf "%-8s%s\n" "$(VERSION)" "`LC_TIME=C date '+%d-%b-%Y'`" > NEWS.tmp
132 @echo -e "\n\n\nFor blogging, you can copy&paste this HTML formatted news:"
133 @echo "-------------- 8< -------------"
134 @last=`head -n1 $(top_srcdir)/NEWS | cut -f1 -d' '`; \
136 for commit in `git rev-list $$last..`; do \
137 data=`git log --format="format:%s%n%an%n%b" $$commit^..$$commit`; \
138 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"'; \
139 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; \
142 @echo "-------------- 8< -------------"
145 @cat $(top_srcdir)/NEWS >> NEWS.tmp
146 @mv NEWS.tmp $(top_srcdir)/NEWS
148 .PHONY: ChangeLog release-news
152 @if test -d "$(srcdir)/.git"; then \
153 (GIT_DIR=$(top_srcdir)/.git $(top_srcdir)/missing --run git log PYGOBJECT_2_17_0^^.. --stat) | fmt --split-only > $@.tmp \
156 echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \
157 (test -f $@ || echo git-log is required to generate this file >> $@)); \
160 (echo A git checkout and git-log is required to generate ChangeLog >&2 && \
161 echo A git checkout and git-log is required to generate this file >> $@); \
166 if test $(srcdir) = .; then :; else \
167 rm -f $(BUILT_EXTRA_DIST); \
170 dist-hook: $(BUILT_EXTRA_DIST)
171 files='$(BUILT_EXTRA_DIST)'; \
172 for f in $$files; do \
173 if test -f $$f; then d=.; else d=$(srcdir); fi; \
174 rm -f $(distdir)/$$f && cp $$d/$$f $(distdir) || exit 1; done
179 @echo " CHECK Pyflakes" $(pycheck_dirs)
180 @if type pyflakes >/dev/null 2>&1; then \
181 (cd $(abs_top_srcdir) && pyflakes $(pycheck_dirs) ); \
182 else echo "skipped, pyflakes not installed"; \
184 @if test -z "$$SKIP_PEP8"; then \
185 echo " CHECK PEP8"; \
186 if type pep8 >/dev/null 2>&1; then \
187 (cd $(abs_top_srcdir) && pep8 --ignore=E501,E123,E124,E402,E731 --repeat --show-source $(pycheck_dirs) ); \
188 else echo "skipped, pep8 not installed"; \
193 cd tests && $(MAKE) check.gdb
196 cd tests && $(MAKE) check.nemiver
199 cd tests && $(MAKE) check.valgrind
202 cd tests && $(MAKE) check.valgrindlog
205 cd tests && $(MAKE) check.valgrindxml
207 @GNOME_CODE_COVERAGE_RULES@