generating ChangeLog with "make distcheck" ?

Daniel Stone daniel at
Wed Apr 18 07:48:42 PDT 2007

On Wed, Apr 18, 2007 at 09:35:01AM -0500, Jeremy C. Reed wrote:
> I did a "make distcheck" in app/xconsole and received:
> GIT_DIR=../.git git-log --name-only > ChangeLog
> fatal: Not a git repository: '../.git'
> *** Error code 128
> Stop.
> make: stopped in /opt/xorg-src-git/app/xconsole/xconsole-1.0.3/_build
> *** Error code 1
> How to reference real source that has .git instead of the distcheck copy?
> Or do we have a correct macro or target for generating ChangeLog that 
> should consistently be used?
> Note that the ChangeLog in the distcheck generated tarball is correct (as 
> this target is done twice). So maybe another workaround would be to not do 
> this target again. How?

This is the canonical rule: I haven't found any situation in which it
fails.  It will carry through a changelog even when doing distcheck in
srcdir != objdir, and install an empty one if there's no git context to
be found.

EXTRA_DIST = ChangeLog


.PHONY: 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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <>

More information about the xorg mailing list