From 6d02bdb71bb34205955e76a99939a7be34c676c7 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Wed, 6 Dec 2006 18:48:37 +0200 Subject: Makefile.am: make ChangeLog hook safer Make ChangeLog hook as safe as possible. --- Makefile.am | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile.am b/Makefile.am index 3a02f4e..3924813 100644 --- a/Makefile.am +++ b/Makefile.am @@ -23,8 +23,10 @@ SUBDIRS = src man EXTRA_DIST = README.NV1 ChangeLog -# Always regenerate the changelog CLEANFILES = ChangeLog -ChangeLog: FORCE - git-log > ChangeLog -FORCE: +.PHONY: ChangeLog + +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 -- cgit v1.2.3