create bti.h
[gregoa/bti.git] / Makefile.am
1 bin_PROGRAMS = \
2         bti
3
4 bin_SCRIPTS = \
5         bti-shrink-urls
6
7 bti_SOURCES = \
8         bti.h \
9         bti.c
10
11 bti_CFLAGS = \
12         $(LIBCURL_CFLAGS) \
13         $(XML_CFLAGS) \
14         $(LIBPCRE_CFLAGS) \
15         $(LIBOAUTH_CFLAGS)
16
17 bti_LDADD = \
18         $(LIBCURL_LIBS) \
19         $(XML_LIBS) \
20         $(LIBPCRE_LIBS) \
21         $(LIBOAUTH_LIBS)
22
23 dist_man_MANS = \
24         bti.1 \
25         bti-shrink-urls.1
26
27 EXTRA_DIST = \
28         bti.xml \
29         bti-shrink-urls.xml \
30         bti.example \
31         bti-bashcompletion \
32         RELEASE-NOTES \
33         bti-shrink-urls
34
35 %.1: %.xml
36         $(XSLTPROC) -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
37
38 MAINTAINERCLEANFILES = \
39         $(dist_man_MANS)
40
41 git-clean:
42         rm -f Makefile.in
43
44 distclean-local:
45         rm -rf autom4te.cache
46
47 PREVIOUS_VERSION = 0`expr $(VERSION) - 1`
48
49 changelog:
50         @ head -1 ChangeLog | grep -q "to v$(PREVIOUS_VERSION)"
51         @ mv ChangeLog ChangeLog.tmp
52         @ echo "Summary of changes from v$(PREVIOUS_VERSION) to v$(VERSION)" >> ChangeLog
53         @ echo "============================================" >> ChangeLog
54         @ echo >> ChangeLog
55         @ git log --pretty=short $(PREVIOUS_VERSION)..HEAD | git shortlog  >> ChangeLog
56         @ echo >> ChangeLog
57         @ cat ChangeLog
58         @ cat ChangeLog.tmp >> ChangeLog
59         @ rm ChangeLog.tmp
60
61 git-release:
62         head -1 ChangeLog | grep -q "to v$(VERSION)"
63         head -1 RELEASE-NOTES | grep -q "bti $(VERSION)"
64         git commit -a -m "release $(VERSION)"
65         cat .git/refs/heads/master > .git/refs/tags/$(VERSION)
66         git gc
67         git prune
68
69 AUTOMAKE_OPTIONS = foreign