Makefile.am and configure.ac tweaks to get the release correct
[gregoa/bti.git] / Makefile.am
1 bin_PROGRAMS = \
2         bti
3
4 bti_SOURCES = \
5         bti.c
6
7 dist_man_MANS = \
8         bti.1 \
9         bti-shrink-urls.1
10
11 EXTRA_DIST = \
12         bti.xml \
13         bti-shrink-urls.xml \
14         bti-shrink-urls
15
16 %.1: %.xml
17         $(XSLTPROC) -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
18
19 MAINTAINERCLEANFILES = \
20         $(dist_man_MANS)
21
22 git-clean:
23         rm -f Makefile.in
24
25 distclean-local:
26         rm -rf autom4te.cache
27
28 PREVIOUS_VERSION = 0`expr $(VERSION) - 1`
29
30 changelog:
31         @ head -1 ChangeLog | grep -q "to v$(PREVIOUS_VERSION)"
32         @ mv ChangeLog ChangeLog.tmp
33         @ echo "Summary of changes from v$(PREVIOUS_VERSION) to v$(VERSION)" >> ChangeLog
34         @ echo "============================================" >> ChangeLog
35         @ echo >> ChangeLog
36         @ git log --pretty=short $(PREVIOUS_VERSION)..HEAD | git shortlog  >> ChangeLog
37         @ echo >> ChangeLog
38         @ cat ChangeLog
39         @ cat ChangeLog.tmp >> ChangeLog
40         @ rm ChangeLog.tmp
41
42 git-release:
43         head -1 ChangeLog | grep -q "to v$(VERSION)"
44         head -1 RELEASE-NOTES | grep -q "bti $(VERSION)"
45         git commit -a -m "release $(VERSION)"
46         cat .git/refs/heads/master > .git/refs/tags/$(VERSION)
47         git gc
48         git prune
49
50 AUTOMAKE_OPTIONS = foreign