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