summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2013-09-27 15:58:33 +0200
committerThomas Schwinge <thomas@codesourcery.com>2013-09-27 15:58:33 +0200
commit4a69ee8aa0efb013f1041bb7d745027abc995c72 (patch)
tree740ff5e5d20ff19324ee3068c2a2026548278ec5 /Makefile.am
parentb53836447df7230cd5665a7ccabd2a6e1a6607e5 (diff)
Generate ChangeLog files for distributions.
* gitlog-to-changelog: New file; import from gnulib's 9fc81090f6c5590bd1b0e0fa5087577a2ee43a3e:build-aux/gitlog-to-changelog. * Makefile.am (gen-ChangeLog): New target. (dist-hook): Depend on it.
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am24
1 files changed, 24 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index 747fc51..33bc768 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -30,3 +30,27 @@ SUFFIXES = .h .symo .symc .sym
cpu.symc: $(srcdir)/gensym.awk
$(migcom_OBJECTS): cpu.h
+
+#
+# Building a distribution.
+#
+
+dist-hook: gen-ChangeLog
+
+gen_start_commit = 12a56fa3ce0d65a25e7bcf68aba03d8ba189273f
+ChangeLog_files = ChangeLog
+.PHONY: gen-ChangeLog
+gen-ChangeLog:
+ $(AM_V_GEN)if test -d $(top_srcdir)/.git; then \
+ (cd $(top_srcdir)/ && \
+ ./gitlog-to-changelog --strip-tab \
+ $(gen_start_commit).. && \
+ echo) >> $(distdir)/cl-t && \
+ for f in $(ChangeLog_files); do \
+ (cd $(top_srcdir)/ && \
+ git show $(gen_start_commit):$$f) >> $(distdir)/cl-t && \
+ rm -f $(distdir)/$$f && \
+ mv $(distdir)/cl-t $(distdir)/$$f \
+ || exit $$?; \
+ done; \
+ fi