summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2009-04-18 15:45:21 +0100
committerRichard Hughes <richard@hughsie.com>2009-04-18 15:45:21 +0100
commitd4ff8483e8a6479f40f94a6eb36600d228ef206a (patch)
tree8e6f9b9d2cc3769d55f4fdd606b7d0284d5a70b9 /Makefile.am
parentd002892cc56c91fa3f161404c0530633a6d0f648 (diff)
trivial: generate a ChangeLog file from the git history
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am21
1 files changed, 20 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index b47ed6ca..4db746f5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -87,7 +87,6 @@ EXTRA_DIST = \
NEWS \
autogen.sh \
config.h \
- ChangeLog \
moc.mk \
intltool-extract.in \
intltool-merge.in \
@@ -101,3 +100,23 @@ DISTCHECK_CONFIGURE_FLAGS = \
--disable-developer \
$(NULL)
+distclean-local:
+ if test $(srdcir) = .; then :; else \
+ rm -f ChangeLog; \
+ fi
+
+ChangeLog:
+ @echo Creating $@
+ @if test -d "$(srcdir)/.git"; then \
+ (GIT_DIR=$(top_srcdir)/.git ./missing --run git log PACKAGEKIT_0_3_X.. --stat -M -C --name-status --date=short --no-color) | 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: ChangeLog