Commit 80e3730e authored by Daniel P. Berrange's avatar Daniel P. Berrange

Auto-generate AUTHORS file from GIT logs during make dist

Instead of manually keeping the AUTHORS file in sync with
GIT, auto-generate it during make dist phase
Signed-off-by: 's avatarDaniel P. Berrange <berrange@redhat.com>
parent fe425a10
AUTHORS
Makefile.in
Makefile
aclocal.m4
......
......@@ -10,8 +10,6 @@ The primary maintainers of libvirt-sandbox are:
Patches have been received from:
Radu Caragea <sinaelgl@gmail.com>
Alex Jia <ajia@redhat.com>
Michael Scherer <misc@zarb.org>
#authorslist#
... send patches to get your name added ...
......@@ -6,17 +6,21 @@ ACLOCAL_AMFLAGS = -I m4
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libvirt-sandbox-1.0.pc
EXTRA_DIST = $(PACKAGE).spec $(pkgconfig_DATA:%.pc=%.pc.in)
EXTRA_DIST = \
$(PACKAGE).spec \
$(pkgconfig_DATA:%.pc=%.pc.in) \
AUTHORS.in \
$(NULL)
DISTCLEAN_FILES = $(PACKAGE).spec $(pkgconfig_DATA)
DISTCHECK_CONFIGURE_FLAGS = --enable-introspection=yes --enable-gtk-doc=yes
dist-hook: gen-ChangeLog
dist-hook: gen-ChangeLog gen-AUTHORS
# Generate the ChangeLog file (with all entries since the switch to git)
# and insert it into the directory we're about to use to create a tarball.
.PHONY: gen-ChangeLog
.PHONY: gen-ChangeLog gen-AUTHORS
gen-ChangeLog:
if test -d .git || test -d ../.git; then \
$(top_srcdir)/build-aux/gitlog-to-changelog \
......@@ -24,3 +28,11 @@ gen-ChangeLog:
rm -f $(distdir)/ChangeLog; \
mv $(distdir)/cl-t $(distdir)/ChangeLog; \
fi
gen-AUTHORS:
$(AM_V_GEN)if test -d $(srcdir)/.git; then \
out="`cd $(srcdir) && git log --pretty=format:'%aN <%aE>' | sort -u`" && \
perl -p -e "s/#authorslist#// and print '$$out'" \
< $(srcdir)/AUTHORS.in > $(distdir)/AUTHORS-tmp && \
mv -f $(distdir)/AUTHORS-tmp $(distdir)/AUTHORS ; \
fi
......@@ -29,6 +29,11 @@ if test -z "$*"; then
echo "the $0 command line."
fi
# Real ChangeLog/AUTHORS is auto-generated from GIT logs at
# make dist time, but automake requires that it
# exists at all times :-(
touch ChangeLog AUTHORS
mkdir -p build-aux
intltoolize --force
autoreconf -if
......
......@@ -18,7 +18,6 @@
# Tests not to run as part of "make distcheck".
local-checks-to-skip = \
changelog-check \
check-AUTHORS \
makefile-check \
makefile_path_separator_check \
patch-check \
......@@ -128,20 +127,6 @@ sc_copyright_format:
# We don't use this feature of maint.mk.
prev_version_file = /dev/null
# Give credit where due:
# Ensure that each commit author email address (possibly mapped via
# git log's .mailmap) appears in our AUTHORS file.
sc_check_author_list:
@fail=0; \
for i in $$(git log --pretty=format:%aE%n|sort -u|grep -v '^$$'); do \
sanitized=$$(echo "$$i"|LC_ALL=C sed 's/\([^a-zA-Z0-9_@-]\)/\\\1/g'); \
grep -iq "<$$sanitized>" $(srcdir)/AUTHORS \
|| { printf '%s\n' "$$i" >&2; fail=1; }; \
done; \
test $$fail = 1 \
&& echo '$(ME): committer(s) not listed in AUTHORS' >&2; \
test $$fail = 0
exclude_file_name_regexp--sc_libvirt_unmarked_diagnostics = ^libvirt-sandbox/tests
exclude_file_name_regexp--sc_bindtextdomain = ^(libvirt-sandbox/tests)|(libvirt-sandbox/libvirt-sandbox-init-*)|(bin/virt-sandbox.c)|(bin/virt-sandbox-service-util.c)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment