From: Jordi Mallach Date: Mon, 2 May 2011 01:27:29 +0000 (+0200) Subject: Autogenerate a ChangeLog. X-Git-Url: https://hydra-www.ietfng.org/gitweb/?a=commitdiff_plain;h=a65b45bf4821419cca32e454ba0f76cc4dfdb049;p=gtetrinet Autogenerate a ChangeLog. Generate a ChangeLog from 'git log' in the dist-hook. Add an empty ChangeLog file with a notice. --- diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..1460016 --- /dev/null +++ b/ChangeLog @@ -0,0 +1,2 @@ +The ChangeLog is autogenerated when creating the release. +If you are seeing this, use 'git log' to view the list of changes. diff --git a/Makefile.am b/Makefile.am index 486703a..75cc0d1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -21,5 +21,17 @@ EXTRA_DIST = ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL NEWS README \ install-data-local: -GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(srcdir)/$(schema_DATA) -changelog: - cvs2cl -b --utc -S --no-wrap -f ChangeLog.CVS +# Generate a ChangeLog file from 'git log' +dist-hook: + @if test -d "$(srcdir)/.git"; \ + then \ + echo Creating ChangeLog && \ + ( cd "$(top_srcdir)" && \ + echo '# Generated by Makefile. Do not edit.'; echo; \ + $(top_srcdir)/missing --run git log --stat ) > ChangeLog.tmp \ + && mv -f ChangeLog.tmp $(top_distdir)/ChangeLog \ + || ( rm -f ChangeLog.tmp ; \ + echo Failed to generate ChangeLog >&2 ); \ + else \ + echo A git clone is required to generate a ChangeLog >&2; \ + fi