Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/eselect-rust:master commit in: /
Date: Mon, 11 Mar 2019 05:02:48
Message-Id: 1552187931.4a507f5d088260c117fc3836ecc66e468af4849b.whissi@gentoo
1 commit: 4a507f5d088260c117fc3836ecc66e468af4849b
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Sun Mar 10 03:18:51 2019 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Sun Mar 10 03:18:51 2019 +0000
6 URL: https://gitweb.gentoo.org/proj/eselect-rust.git/commit/?id=4a507f5d
7
8 Generate & add ChangeLog when creating dist target
9
10 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
11
12 Makefile.am | 18 ++++++++++++++++++
13 1 file changed, 18 insertions(+)
14
15 diff --git a/Makefile.am b/Makefile.am
16 index 144bee4..b969189 100644
17 --- a/Makefile.am
18 +++ b/Makefile.am
19 @@ -1,2 +1,20 @@
20 eselectdir = $(datadir)/eselect/modules
21 dist_eselect_DATA = rust.eselect
22 +
23 +dist-hook: gen-ChangeLog
24 +
25 +.PHONY: gen-ChangeLog
26 +gen-ChangeLog:
27 + @if test -d "$(top_srcdir)/.git"; \
28 + then \
29 + echo "Creating ChangeLog ..." && \
30 + ( cd "$(top_srcdir)" && \
31 + echo '# Generated by Makefile. Do not edit.'; echo; \
32 + git log --no-color --no-decorate ) > ChangeLog.tmp \
33 + && mv -f ChangeLog.tmp $(top_distdir)/ChangeLog \
34 + || ( rm -f ChangeLog.tmp ; \
35 + echo "Failed to generate ChangeLog" >&2; \
36 + exit 1; ); \
37 + else \
38 + echo "A git clone is required to generate a ChangeLog" >&2; \
39 + fi