]> git.ipfire.org Git - thirdparty/lldpd.git/blob - Makefile.am
build: fix changelog generation
[thirdparty/lldpd.git] / Makefile.am
1 include doxygen.am
2
3 ACLOCAL_AMFLAGS = -I m4
4
5 SUBDIRS = src/compat src src/daemon src/lib src/client tests
6 EXTRA_DIST = $(DX_CONFIG) include
7 DIST_SUBDIRS = $(SUBDIRS) libevent
8
9 dist_doc_DATA = README.md NEWS
10
11 # Build changelog from git history
12 dist-hook: $(distdir)/ChangeLog
13 __force-changelog-generation:
14 $(distdir)/ChangeLog: __force-changelog-generation
15 $(AM_V_GEN)if test -d $(top_srcdir)/.git; then \
16 prev=$$(git describe --tags --always --match [0-9]* 2> /dev/null) ; \
17 for tag in $$(git tag | grep -E '^[0-9]+(\.[0-9]+){1,}$$' | sort -rn); do \
18 if [ x"$$prev" = x ]; then prev=$$tag ; fi ; \
19 if [ x"$$prev" = x"$$tag" ]; then continue; fi ; \
20 echo "$$prev [$$(git log $$prev -1 --pretty=format:'%ai')]:" ; \
21 echo "" ; \
22 git log --pretty=' - [%h] %s (%an)' $$tag..$$prev ; \
23 echo "" ; \
24 prev=$$tag ; \
25 done > $@ ; \
26 else \
27 touch $@ ; \
28 fi
29
30 MOSTLYCLEANFILES = $(DX_CLEANFILES)