gitlog-to-changelog needs to run in the source directory so it can
find the git metadata. This was masked in many cases because “git log”
will look in parent directories for .git, but if you have your build
directory completely outside the source tree then it can’t find it.
* Makefile.am (gen-ChangeLog): Execute gitlog-to-changelog in $(top_srcdir).
.PHONY: gen-ChangeLog
gen-ChangeLog:
if test -d $(top_srcdir)/.git; then \
- $(top_srcdir)/build-aux/gitlog-to-changelog \
- --since='$(gen_start_date)' > $(distdir)/cl-t \
+ (cd $(top_srcdir) && ./build-aux/gitlog-to-changelog \
+ --since='$(gen_start_date)') > $(distdir)/cl-t \
&& rm -f $(distdir)/ChangeLog \
&& mv $(distdir)/cl-t $(distdir)/ChangeLog; \
fi