summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2017-09-13 18:25:22 +0200
committerAleksander Morgado <aleksander@aleksander.es>2017-09-13 22:15:18 -0700
commit7becf366e78a71778232ca636f7677bd00ea2a00 (patch)
treebac1daae1f0b18800b5e0423bc5ac223c6262c36
parente50f84f3fc499042939a190994127bd7718953ce (diff)
build: generate ChangeLog from git during dist
-rw-r--r--Makefile.am14
-rwxr-xr-xautogen.sh1
2 files changed, 14 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index aefa985..4298bfb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -7,6 +7,20 @@ DISTCHECK_CONFIGURE_FLAGS = \
--with-udev-base-dir="$$dc_install_base" \
--enable-gtk-doc
+ChangeLog:
+ $(AM_V_GEN) if test -d "$(srcdir)/.git"; then \
+ (GIT_DIR=$(top_srcdir)/.git $(top_srcdir)/missing --run git log --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
+
+
EXTRA_DIST = \
gtester.make \
COPYING.LIB
diff --git a/autogen.sh b/autogen.sh
index 3fb42d5..2b66546 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -14,7 +14,6 @@ PKG_NAME=libmbim
}
(cd $srcdir;
- touch ChangeLog
autoreconf --force --install --verbose
)