summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Nicholson <dbn.lists@gmail.com>2008-06-20 09:00:25 -0700
committerDan Nicholson <dbn.lists@gmail.com>2008-06-20 09:00:25 -0700
commit9a0f403371c7f9215f1a6649fcc3773778c7277f (patch)
tree73e5882b6803d3703fb66e6cfe92a0754e39e2d4
parentfe69ad97de34116d9534d5e7e7fe96ec8cb9ffc2 (diff)
Fix ChangeLog generation for distcheck
The only sane way to handle the ChangeLog generation is to only create it when we have a .git directory and srcdir != builddir.
-rw-r--r--Makefile.am18
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 > $@