diff --git a/macros2/gnome-common.m4 b/macros2/gnome-common.m4
index 21f3ef1..caa54cc 100644
--- a/macros2/gnome-common.m4
+++ b/macros2/gnome-common.m4
@@ -45,3 +45,20 @@ AC_DEFUN([GNOME_MAINTAINER_MODE_DEFINES],
 	fi
 	AC_SUBST(DISABLE_DEPRECATED)
 ])
+
+dnl Defines GNOME_CHANGELOG_RULE
+dnl If you want to start the auto-generated ChangeLog from a specific git revision,
+dnl rather than from the beginning of time, pass a parameter specifying that revision
+dnl in git-rev-parse format.
+AC_DEFUN([GNOME_CHANGELOG],
+[
+	if test -n "$1"; then
+		changelog_start="$1.."
+	else
+		changelog_start=""
+	fi
+
+	GNOME_CHANGELOG_RULE="ChangeLog: ; @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 $changelog_start --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"
+
+	AC_SUBST(GNOME_CHANGELOG_RULE)
+])
