From 1300507a26c29e966b53d1da34e766c442318ea1 Mon Sep 17 00:00:00 2001 From: Dan Nicholson Date: Mon, 16 Jun 2008 10:00:11 -0700 Subject: Add rules for generating ChangeLog The ChangeLog file will be generated from the git log at dist time and included in the tarball. --- .gitignore | 1 + Makefile.am | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) 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 -- cgit v1.2.3