generate and dist ChangeLog
authorDavid Zeuthen <davidz@redhat.com>
Sun, 8 Apr 2007 21:25:31 +0000 (17:25 -0400)
committerDavid Zeuthen <davidz@redhat.com>
Sun, 8 Apr 2007 21:25:31 +0000 (17:25 -0400)
Makefile.am

index 3d285ee..c9392e6 100644 (file)
@@ -9,5 +9,27 @@ DISTCLEANFILES = libpolkit.pc
 
 EXTRA_DIST = HACKING libpolkit.pc.in mkinstalldirs
 
+# Creating ChangeLog from git log (taken from cairo/Makefile.am):
+ChangeLog: $(srcdir)/ChangeLog
+
+$(srcdir)/ChangeLog:
+       @if test -d "$(srcdir)/.git"; then \
+         (cd "$(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
+
+.PHONY: ChangeLog $(srcdir)/ChangeLog
+
+EXTRA_DIST = HACKING libpolkit.pc.in mkinstalldirs ChangeLog
+
+
 clean-local :
        rm -f *~