ChangeLog is now automatically generated from git log output
[hvutilities.git] / Makefile.am
index 1645ab5..1868a3d 100644 (file)
@@ -1,5 +1,7 @@
 ## Makefile.am -- Process this file with automake to produce Makefile.in
 
+.PHONY: changelog
+
 AUTOMAKE_OPTIONS = gnu
 
 SUBDIRS = scripts data
@@ -11,8 +13,26 @@ ACLOCAL = aclocal -I $(ac_aux_dir)
 
 CLEANFILES = *~
 
-MAINTAINERCLEANFILES = Makefile.in aclocal.m4 configure config-h.in \
-                       stamp-h.in $(ac_aux_dir)/depcomp \
-                       $(ac_aux_dir)/install-sh $(ac_aux_dir)/missing \
-                       $(ac_aux_dir)/mkinstalldirs $(ac_aux_dir)/config.guess \
-                       $(ac_aux_dir)/config.sub $(ac_aux_dir)/ltmain.sh
+MAINTAINERCLEANFILES = \
+    Makefile.in \
+    aclocal.m4 \
+    configure \
+    stamp-h.in \
+    ChangeLog \
+    $(ac_aux_dir)/depcomp \
+    $(ac_aux_dir)/install-sh \
+    $(ac_aux_dir)/missing \
+    $(ac_aux_dir)/mkinstalldirs \
+    $(ac_aux_dir)/config.guess \
+    $(ac_aux_dir)/config.sub \
+    $(ac_aux_dir)/ltmain.sh
+
+changelog:
+       @if test -d $(srcdir)/.git; then          \
+         $(srcdir)/build-aux/gitlog-to-changelog \
+           --format='%s%n%n%b%n'                 \
+           --no-cluster                          \
+           --strip-tab                           \
+           --strip-cherry-pick                   \
+           >ChangeLog;                           \
+       fi