summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorDamien Lespiau <damien.lespiau@gmail.com>2009-04-15 12:31:26 +0100
committerDamien Lespiau <damien.lespiau@gmail.com>2009-04-15 12:38:56 +0100
commit26581db1ff8cab795cf5a13034536be7f4a56594 (patch)
tree6d93fd31dfd046eaa85e2158b40901c0fd14ea4e /Makefile.am
parentd3c0071945a3ce8466efd0f8916c5a1d37580ac0 (diff)
[build] Generate a ChangeLog at make dist time
Since the switch from SVN to git, the ChangeLog is not updated as it used to be but will be generated at make dist time. The distributed ChangeLog will have the entries from the tag libccss-$major.$minor to HEAD
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am17
1 files changed, 17 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index 43fc450..f0fa241 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -50,3 +50,20 @@ EXTRA_DIST = \
libccss-gtk-1.pc.in \
$(NULL)
+PREV_RELEASE=$(CCSS_VERSION_MAJOR).$$(echo "$(CCSS_VERSION_MINOR)-1" | bc)
+
+dist-hook:
+ @if test -d "$(srcdir)/.git"; \
+ then \
+ to=""; \
+ from="libccss-$(PREV_RELEASE)"; \
+ echo Creating ChangeLog && \
+ ( cd "$(top_srcdir)" && \
+ echo '# Generated by configure. Do no edit.'; echo; \
+ $(top_srcdir)/missing --run perl $(top_srcdir)/build/gen-changelog.pl $$from..$$to ) > ChangeLog.tmp \
+ && mv -f ChangeLog.tmp $(top_distdir)/ChangeLog \
+ || ( rm -f ChangeLog.tmp ; \
+ echo Failed to generate ChangeLog >&2 ); \
+ else \
+ echo A git checkout is required to generate a ChangeLog >&2; \
+ fi