]> git.ipfire.org Git - thirdparty/lldpd.git/blob - Makefile.am
build: add author name and commit hash in generated changelog
[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 man tests
6 EXTRA_DIST = $(DX_CONFIG)
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 $(distdir)/ChangeLog:
14 if test -d $(top_srcdir)/.git; then \
15 prev=$$(git describe --tags --always --match [0-9]* 2> /dev/null) ; \
16 for tag in $$(git tag | grep -E '^[0-9]+(\.[0-9]+){1,}$$' | sort -rn); do \
17 if [ x"$$prev" = x ]; then prev=$$tag ; fi ; \
18 if [ x"$$prev" = x"$$tag" ]; then continue; fi ; \
19 echo "$$prev:" ; \
20 echo "" ; \
21 git log --pretty=' - [%h] %s (%an)' $$tag..$$prev ; \
22 echo "" ; \
23 prev=$$tag ; \
24 done > $@ ; \
25 fi
26
27 MOSTLYCLEANFILES = $(DX_CLEANFILES)