Generate ChangeLog from git log during "make dist".
* tools/gitlog-to-changelog: New file, from gnulib. * Makefile.am (EXTRA_DIST): Distribute it. (dist-hook, gen_start, gen-ChangeLog): Generate the ChangeLog during distdir.
This commit is contained in:
parent
915115d9e2
commit
4749d77e4f
2 changed files with 406 additions and 1 deletions
22
Makefile.am
22
Makefile.am
|
|
@ -39,5 +39,25 @@ endif
|
|||
SUBDIRS = $(MAYBE_BUDDY) $(MAYBE_LBTT) $(NEVER_BENCH) doc src wrap ltdl iface
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
EXTRA_DIST = HACKING ChangeLog.1
|
||||
EXTRA_DIST = HACKING ChangeLog.1 tools/gitlog-to-changelog
|
||||
|
||||
dist-hook: gen-ChangeLog
|
||||
|
||||
gen_start = 2012-03-10
|
||||
.PHONY: gen-ChangeLog
|
||||
gen-ChangeLog:
|
||||
if test -d .git; then \
|
||||
## Generate all commits in the form "SHA1 subject"
|
||||
git log --since=$(gen_start) --pretty=oneline | \
|
||||
## Filter out commits whose subject start with '['. These are usually
|
||||
## [buddy] or [lbtt] tags to indicate we are committing on a subproject.
|
||||
grep -v '........................................ \[' | \
|
||||
## Keep the SHA1
|
||||
cut -c 1-40 | \
|
||||
## Feed all that to gitlog-to-changelog
|
||||
$(top_srcdir)/tools/gitlog-to-changelog \
|
||||
--no-cluster --format='%s%n%n%b%n' -- \
|
||||
--stdin --no-walk > $(distdir)/cl-t; \
|
||||
rm -f $(distdir)/ChangeLog; \
|
||||
mv $(distdir)/cl-t $(distdir)/ChangeLog; \
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue