/
Makefile.am
28 lines (25 loc) · 810 Bytes
/
Makefile.am
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
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = src
EXTRA_DIST = get-version autogen.sh
DISTCLEANFILES = ChangeLog
dist_doc_DATA = README.md
doc_DATA = ChangeLog
# Build changelog from git history
.PHONY: ChangeLog
ChangeLog:
$(AM_V_GEN)if test -d $(top_srcdir)/.git; then \
prev=$$(git describe --tags --always --match '[0-9]*' 2> /dev/null) ; \
for tag in $$(git tag | $(EGREP) '^[0-9]+(\.[0-9]+){1,}$$' | sort -rV); do \
if [ x"$$prev" = x ]; then prev=$$tag ; fi ; \
if [ x"$$prev" = x"$$tag" ]; then continue; fi ; \
echo "$$prev [$$(git log $$prev -1 --pretty=format:'%ai')]:" ; \
echo "" ; \
git log --pretty=' - [%h] %s (%an)' $$tag..$$prev ; \
echo "" ; \
prev=$$tag ; \
done > $@ ; \
else \
touch $@ ; \
fi
dist-hook:
echo $(VERSION) > $(distdir)/.dist-version