
On 08/14/2017 05:42 PM, Ján Tomko wrote:
On Sat, Aug 05, 2017 at 02:29:58PM +0200, Michal Privoznik wrote:
This is basically taken from libvirt repo. I'm creating .mailmap to avoid doubled entries in the AUTHORS file. Also, AUTHORS is no longer tracked by git.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- .gitignore | 1 + .mailmap | 13 +++++++++++++ AUTHORS => AUTHORS.in | 21 +++++---------------- Makefile.am | 13 ++++++++++++- autogen.sh | 3 +++ 5 files changed, 34 insertions(+), 17 deletions(-) create mode 100644 .mailmap rename AUTHORS => AUTHORS.in (45%)
diff --git a/Makefile.am b/Makefile.am index e28a96f..4633f43 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,9 +2,20 @@ SUBDIRS = tools src docs tests
ACLOCAL_AMFLAGS = -I m4
-EXTRA_DIST = libvirt-php.spec libvirt-php.spec.in winsrc +EXTRA_DIST = libvirt-php.spec libvirt-php.spec.in winsrc AUTHORS.in
AM_DISTCHECK_CONFIGURE_FLAGS = --with-distcheck
rpm: clean @(unset CDPATH ; $(MAKE) dist && rpmbuild -ta $(distdir).tar.gz) + +dist-hook: gen-AUTHORS + +.PHONY: gen-AUTHORS +gen-AUTHORS: + $(AM_V_GEN)if test -d $(srcdir)/.git; then \ + out="`cd $(srcdir) && git log --pretty=format:'%aN <%aE>' | sort -u | sed 's/^/\t/'`" && \ + perl -p -e "s/#authorslist#// and print '$$out'" \ + < $(srcdir)/AUTHORS.in > $(distdir)/AUTHORS-tmp && \ + mv -f $(distdir)/AUTHORS-tmp $(distdir)/AUTHORS ; \ + fi
What is the point of going through a temporary file and spawning one extra process on success? We use the pattern a lot in libvirt's Makefile and it just seems wasteful to me.
What extra process do you have in mind?
Also, this probably won't work correctly with git work-trees, since those have .git as a regular file, not a directory. See: http://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=e97dce1b84ab63
Well, in that case it's broken in libvirt too. Feel free to fix it and I'll cherry-pick the fix into -php then. Michal