summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Nicholson <dbn.lists@gmail.com>2008-06-16 10:00:11 -0700
committerDan Nicholson <dbn.lists@gmail.com>2008-06-16 10:00:11 -0700
commit1300507a26c29e966b53d1da34e766c442318ea1 (patch)
tree5b4983f6141e4995505aea0925c036d788a927e9
parenta11f47b8a13e7d5f626f9d9349a3adac262580bb (diff)
Add rules for generating ChangeLog
The ChangeLog file will be generated from the git log at dist time and included in the tarball.
-rw-r--r--.gitignore1
-rw-r--r--Makefile.am18
2 files changed, 19 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index df14775..fb11376 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,6 +5,7 @@
.libs
/auto
/autom4te.cache
+ChangeLog
Makefile.in
Makefile
aclocal.m4
diff --git a/Makefile.am b/Makefile.am
index 1f08a70..4239395 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,3 +1,21 @@
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; \
+ exit 0; \
+ fi; \
+ echo git --git-dir=$(top_srcdir)/.git log '>' $@; \
+ git --git-dir=$(top_srcdir)/.git log > $@ || touch ChangeLog