From: John Darrington Date: Wed, 9 Dec 2015 06:47:18 +0000 (+0100) Subject: Fix generate-changelog rule when building from outside of the source repository X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;ds=sidebyside;h=89b2ecdde19553295888a173eeff8085e206bcda;p=pspp Fix generate-changelog rule when building from outside of the source repository The "make dist" target depends upon a phony target "generate-changelog" which generates the ChangeLog file. Unfortunately, this was failing if the current directory was not the source directory. Worse, this failure was not detected, but would erroneously generate an empty ChangeLog. This change fixes both these problems. --- diff --git a/Makefile.am b/Makefile.am index c475469d09..106c08fd0e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -58,8 +58,8 @@ noinst_HEADERS = $(EXTRA_DIST) generate-changelog: if test -d $(top_srcdir)/.git; then \ - $(top_srcdir)/build-aux/gitlog-to-changelog --since=2008-07-27 \ - > $(distdir)/cl-t; \ + $(top_srcdir)/build-aux/gitlog-to-changelog --since=2008-07-27 --srcdir=$(top_srcdir) \ + > $(distdir)/cl-t || exit 1; \ rm -f $(distdir)/ChangeLog; \ mv $(distdir)/cl-t $(distdir)/ChangeLog; \ fi