summaryrefslogtreecommitdiff
path: root/Makefile.am
blob: eccb79a190b203382ad2de0a256e9ea2a84cf68c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
AUTOMAKE_OPTIONS = 1.7

SUBDIRS = examples gi tests pygtkcompat

PLATFORM_VERSION = 3.0

CLEANFILES = \
	`find "$(builddir)" -type f -name "*.pyc" -print`

EXTRA_DIST = \
	pygobject-$(PLATFORM_VERSION).pc.in \
	PKG-INFO \
	PKG-INFO.in \
	m4/as-ac-expand.m4 \
	m4/jhflags.m4 \
	m4/python.m4

MAINTAINERCLEANFILES = \
	$(srcdir)/INSTALL \
	$(srcdir)/aclocal.m4 \
	$(srcdir)/autoscan.log \
	$(srcdir)/compile \
	$(srcdir)/config.guess \
	$(srcdir)/config.h.in \
	$(srcdir)/config.sub \
	$(srcdir)/configure.scan \
	$(srcdir)/depcomp \
	$(srcdir)/install-sh \
	$(srcdir)/ltmain.sh \
	$(srcdir)/missing \
	$(srcdir)/mkinstalldirs \
	$(srcdir)/omf.make \
	$(srcdir)/xmldocs.make \
	$(srcdir)/gtk-doc.make \
	$(srcdir)/ChangeLog \
	$(srcdir)/py-compile \
	$(srcdir)/m4/libtool.m4 \
	$(srcdir)/m4/ltoptions.m4 \
	$(srcdir)/m4/ltsugar.m4 \
	$(srcdir)/m4/ltversion.m4 \
	$(srcdir)/m4/lt~obsolete.m4 \
	`find "$(srcdir)" -type f -name Makefile.in -print` \
	`find "$(builddir)" -type f -name "*.pyc" -print`

BUILT_EXTRA_DIST = 		\
	ChangeLog

# pkg-config files
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = pygobject-$(PLATFORM_VERSION).pc

# python
pyexec_LTLIBRARIES =

# install pth file.

EGG_NAME = $(PACKAGE)-$(PACKAGE_VERSION)-py$(PYTHON_VERSION)-$(PLATFORM)

install-data-local:
	$(mkinstalldirs) $(DESTDIR)$(pyexecdir)
	cp $(top_builddir)/PKG-INFO $(DESTDIR)$(pyexecdir)/$(EGG_NAME).egg-info
install-exec-local:
	$(mkinstalldirs) $(DESTDIR)$(pyexecdir)
uninstall-local:
	rm -f $(DESTDIR)$(pyexecdir)/$(EGG_NAME).egg-info

egg: EGG_TMPDIR:=$(TMPDIR)/$(PACKAGE)-$(PACKAGE_VERSION)
egg: $(top_srcdir)/gobject/gobject.la PKG-INFO
	rm -fr $(EGG_TMPDIR)
	echo $(EGG_NAME).egg
	$(MKDIR_P) $(EGG_TMPDIR)
	$(MKDIR_P) $(EGG_TMPDIR)/EGG-INFO
	$(MAKE) -C gobject install-pkgpyexecLTLIBRARIES pkgpyexecdir=$(EGG_TMPDIR)
	rm -fr $(EGG_TMPDIR)/gobject.la
	$(INSTALL) PKG-INFO $(EGG_TMPDIR)/EGG-INFO
	echo "gobject.so" >> $(EGG_TMPDIR)/EGG-INFO/native_libs.txt
	( echo "gobject" ) >> $(EGG_TMPDIR)/EGG-INFO/top_level.txt
	cd $(EGG_TMPDIR) && zip -rq $(EGG_NAME).egg .
	mv $(EGG_TMPDIR)/$(EGG_NAME).egg .
	rm -fr $(EGG_TMPDIR)

doc-dist:
	mkdir pygobject
	cp -r docs/html/*.html pygobject
	cp -r docs/html/*.sgml pygobject
	cp -r docs/html/*.devhelp pygobject
	cp -r docs/style.css pygobject
	tar cfz $(PACKAGE)-docs.tar.gz pygobject
	rm -fr pygobject

release-news:
	printf "%-8s%s\n" "$(VERSION)" "`LC_TIME=C date '+%d-%b-%Y'`" > NEWS.tmp

	@echo -e "\n\n\nFor blogging, you can copy&paste this HTML formatted news:"
	@echo "-------------- 8< -------------"
	@last=`head -n1 NEWS | cut -f1 -d' '`; \
        echo "<ul>"; \
	for commit in `git rev-list $$last..`; do \
	   data=`git log --format="format:%s%n%an%n%b" $$commit^..$$commit`; \
	   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"'; \
	   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; \
        done
	@echo "</ul>"
	@echo "-------------- 8< -------------"

	@echo >> NEWS.tmp
	@cat NEWS >> NEWS.tmp
	@mv NEWS.tmp NEWS

.PHONY: ChangeLog release-news

ChangeLog:
	@echo Creating $@
	@if test -d "$(srcdir)/.git"; then \
	  (GIT_DIR=$(top_srcdir)/.git ./missing --run git log PYGOBJECT_2_17_0^^.. --stat) | fmt --split-only > $@.tmp \
	  && mv -f $@.tmp $@ \
	  || ($(RM) $@.tmp; \
	      echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \
	      (test -f $@ || echo git-log is required to generate this file >> $@)); \
	else \
	  test -f $@ || \
	  (echo A git checkout and git-log is required to generate ChangeLog >&2 && \
	  echo A git checkout and git-log is required to generate this file >> $@); \
	fi


distclean-local:
	if test $(srcdir) = .; then :; else \
	    rm -f $(BUILT_EXTRA_DIST); \
	fi

dist-hook: $(BUILT_EXTRA_DIST)
	files='$(BUILT_EXTRA_DIST)'; \
	for f in $$files; do \
	  if test -f $$f; then d=.; else d=$(srcdir); fi; \
	  rm -f $(distdir)/$$f && cp $$d/$$f $(distdir) || exit 1; done

check.gdb:
	cd tests && $(MAKE) check.gdb

check.nemiver:
	cd tests && $(MAKE) check.nemiver

check.valgrind:
	cd tests && $(MAKE) check.valgrind

@GNOME_CODE_COVERAGE_RULES@