more autoconf fun
[gregoa/bti.git] / Makefile.am
1 bin_PROGRAMS = \
2         bti
3         bti-shrink-urls
4
5 bti_SOURCES = \
6         bti.c
7
8 dist_man_MANS = \
9         bti.1 \
10         bti-shrink-urls.1
11
12 EXTRA_DIST = \
13         bti.xml \
14         bti-shrink-urls.xml
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 NEWS | grep -q "udev $(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