[gnome-builder] library-template: use AX_GENERATE_CHANGELOG macro to generate ChangeLog



commit 6e7846e80b21056595512321ab63065693aaeea6
Author: Philip Withnall <philip withnall collabora co uk>
Date:   Sun Jan 31 11:13:39 2016 +0100

    library-template: use AX_GENERATE_CHANGELOG macro to generate ChangeLog
    
    This removes some more boilerplate code.
    
    http://www.gnu.org/software/autoconf-archive/ax_generate_changelog.html
    
    https://bugzilla.gnome.org/show_bug.cgi?id=761356

 .../library_template/shared-library/Makefile.am    |   18 ++++--------------
 .../library_template/shared-library/configure.ac   |    1 +
 2 files changed, 5 insertions(+), 14 deletions(-)
---
diff --git a/plugins/library-template/library_template/shared-library/Makefile.am 
b/plugins/library-template/library_template/shared-library/Makefile.am
index 50c11e4..56b9ab9 100644
--- a/plugins/library-template/library_template/shared-library/Makefile.am
+++ b/plugins/library-template/library_template/shared-library/Makefile.am
@@ -21,22 +21,12 @@ AUTHORS:
                     echo Failed to generate $@ >&2 ); \
        fi
 
-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
-
 .PHONY: AUTHORS
 
+# Generate the ChangeLog.
+ GENERATE_CHANGELOG_RULES@
+dist-hook: dist-ChangeLog
+
 GITIGNOREFILES = \
        **/*.swp \
        *.o \
diff --git a/plugins/library-template/library_template/shared-library/configure.ac 
b/plugins/library-template/library_template/shared-library/configure.ac
index 0eaebd7..5f6bb0b 100644
--- a/plugins/library-template/library_template/shared-library/configure.ac
+++ b/plugins/library-template/library_template/shared-library/configure.ac
@@ -41,6 +41,7 @@ dnl ***********************************************************************
 AM_SILENT_RULES([yes])
 AM_INIT_AUTOMAKE([1.11 foreign subdir-objects tar-ustar no-dist-gzip dist-xz -Wno-portability])
 AM_MAINTAINER_MODE([enable])
+AX_GENERATE_CHANGELOG
 
 
 {{if enable_i18n}}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]