diff options
-rw-r--r-- | Makefile.am | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Makefile.am b/Makefile.am index 2a050d3..47e3e3a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,18 +3,18 @@ SUBDIRS = lib src test dist_noinst_SCRIPTS = abs2rel.sh # ChangeLog rules +EXTRA_DIST = ChangeLog MAINTAINERCLEANFILES = ChangeLog .PHONY: ChangeLog ChangeLog: - @if test ! -d $(top_srcdir)/.git; then \ - if test $(srcdir) != $(builddir) && \ - test -f $(top_srcdir)/ChangeLog; then \ - cp $(srcdir)/ChangeLog $@; \ - else \ - touch ChangeLog; \ - fi; \ + @if test "$(srcdir)" != .; then \ + echo "Can only create ChangeLog from the source directory"; \ exit 0; \ fi; \ - echo git --git-dir=$(top_srcdir)/.git log '>' $@; \ - git --git-dir=$(top_srcdir)/.git log > $@ || touch ChangeLog + if test ! -d $(srcdir)/.git; then \ + echo "No .git directory available. Can't create ChangeLog"; \ + exit 0; \ + fi; \ + echo git --git-dir=$(srcdir)/.git log '>' $@; \ + git --git-dir=$(srcdir)/.git log > $@ |