[hitori] build: Port to AX_GENERATE_CHANGELOG



commit bdaaaaac677864fb35f4a1ea72b0072bf540c392
Author: Philip Withnall <philip tecnocode co uk>
Date:   Sun Feb 22 20:12:02 2015 +0000

    build: Port to AX_GENERATE_CHANGELOG
    
    This simplifies the build logic to generate the ChangeLog.
    
    AX_GENERATE_CHANGELOG comes from autoconf-archive (or, in GNOME, the
    m4-common mirror of autoconf-archive).

 ChangeLog    |    2 ++
 Makefile.am  |   20 ++------------------
 configure.ac |    2 ++
 3 files changed, 6 insertions(+), 18 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..92bcb9b
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,2 @@
+The ChangeLog is auto-generated when releasing.
+If you are seeing this, use 'git log' for a detailed list of changes.
diff --git a/Makefile.am b/Makefile.am
index 54f47f5..749bf6e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -162,7 +162,6 @@ MAINTAINERCLEANFILES = \
        intltool-merge.in \
        intltool-update.in \
        `find "m4" -type f -name "*.m4" -print` \
-       ChangeLog \
        po/Makevars.template \
        po/Rules-quot \
        po/boldquot.sed \
@@ -185,23 +184,8 @@ dist-hook:
 
 # ChangeLog generation
 CHANGELOG_START = V_0_2_2^
-
-ChangeLog: $(srcdir)/ChangeLog
-$(srcdir)/ChangeLog:
-       @echo Creating $@
-       @if test -d "$(srcdir)/.git"; then \
-         (GIT_DIR=$(top_srcdir)/.git ./missing --run \
-          git log $(CHANGELOG_START).. --stat) | fmt --split-only > $@.tmp \
-         && mv -f $@.tmp $@ \
-         || ($(RM) $@.tmp; \
-             echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \
-             (test -f $@ || echo git-log is required to generate this file >> $@)); \
-       else \
-         test -f $@ || \
-         (echo A git checkout and git-log is required to generate ChangeLog >&2 && \
-         echo A git checkout and git-log is required to generate this file >> $@); \
-       fi
-.PHONY: $(srcdir)/ChangeLog
+@GENERATE_CHANGELOG_RULES@
+dist-hook: dist-ChangeLog
 
 # xdg-app bundle
 org.gnome.Hitori.bundle:
diff --git a/configure.ac b/configure.ac
index ae000fd..b40c66b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -39,6 +39,8 @@ YELP_HELP_INIT
 # AppData
 APPSTREAM_XML
 
+AX_GENERATE_CHANGELOG
+
 # Dependencies
 AC_CHECK_FUNCS([atexit])
 PKG_CHECK_MODULES([GENERAL],[


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