-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.am
29 lines (24 loc) · 918 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
29
SUBDIRS = . src doc
DISTCHECK_CONFIGURE_FLAGS = \
--enable-more-warnings=error \
CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
ACLOCAL_AMFLAGS = -I m4
DISTCLEANFILES = ChangeLog
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 log --decorate=full --simplify-by-decoration --pretty=oneline HEAD | sed -r -e 's#^[^\(]*\(([^\)]*)\).*$$#\1#' -e 's#,#\n#g' | grep 'tag:' | sed -r -e 's#[[:space:]]*tag:[[:space:]]*##'); 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' $$tag..$$prev ; \
echo "" ; \
prev=$$tag ; \
done > $@ ; \
else \
touch $@ ; \
fi