diff --git a/Makefile.am b/Makefile.am
index 4a9d456..d736d07 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -46,13 +46,15 @@ DISTCHECK_CONFIGURE_FLAGS = \
 distuninstallcheck_listfiles = find . -type f -print | grep -v 'icon-theme.cache'
 
 # Build ChangeLog from SVN history (r7394 was the first ChangeLog-less checkin).
-# Only build this when in an svn checkout.
+# Only build this when in an svn checkout or in a git repository.
 
 ChangeLog:
-	@if test -f $(top_srcdir)/.svn/entries; then \
+	@if test -f $(top_srcdir)/.svn/entries -o -d $(top_srcdir)/.git; then \
 		svn log -v --xml -r HEAD:7394 $(SVN_ROOT)/$(SVN_MODULE) | \
 			xsltproc --stringparam strip-prefix "$(SVN_MODULE)/$(SVN_BRANCH)" \
 				 --stringparam include-rev "yes" $(top_srcdir)/svn2cl.xsl - > $@; \
 	fi
 
+dist: ChangeLog
+
 .PHONY: ChangeLog
