generating ChangeLog with "make distcheck" ?

Jeremy C. Reed reed at reedmedia.net
Wed Apr 18 08:02:58 PDT 2007


I saw an example from libX11 so I implemented it:

diff --git a/Makefile.am b/Makefile.am
index f0965eb..1a4e143 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -84,6 +84,6 @@ SUFFIXES += .$(APP_MAN_SUFFIX) .man
 .PHONY: ChangeLog
 
 ChangeLog:
-	GIT_DIR=${srcdir}/.git git-log --name-only > ChangeLog
+	(GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2)
 
 dist-hook: ChangeLog

The main difference is that it || on error so the target doesn't have 
error itself.

Is this the approved way for all of Xorg? Is this documented (maybe in 
some wiki)?

Is the MAINTAINERCLEANFILES also required?

The ChangeLog in the tarballs are fine.

Somethings I don't understand:

Why is this target ran four times with "make distcheck"? (The first two 
work and second two fail.)

Why doesn't the error message "git directory not found: installing 
possibly empty changelog" get displayed? Maybe it is redirected somewhere?





More information about the xorg mailing list