summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.mailmap11
-rw-r--r--Makefile.am2
-rw-r--r--TODO7
-rwxr-xr-xbootstrap.sh2
-rwxr-xr-xgen-authors.sh21
-rwxr-xr-xgit-authors-gen.pl105
6 files changed, 23 insertions, 125 deletions
diff --git a/.mailmap b/.mailmap
deleted file mode 100644
index e24333e..0000000
--- a/.mailmap
+++ /dev/null
@@ -1,11 +0,0 @@
-Bogdan Drozdowski <bogdandr@op.pl>
-Bogdan Drozdowski <bogdandr # op . pl>
-Dustin J. Mitchell <dustin@cs.uchicago.edu>
-Dustin J. Mitchell <dustin@zmanda.com>
-Fabien Coelho <fabien@coelho.net>
-Fabien Coelho <autoconf.archive@coelho.net>
-Fabien Coelho <fabien.coelho@ensmp.fr>
-Francesco Salvestrini <salvestrini@gmail.com>
-Francesco Salvestrini <salvestrini@users.sourceforge.net>
-Peter Johansson <peterandrejohansson@gmail.com>
-Peter Johansson <trojkan@gmail.com>
diff --git a/Makefile.am b/Makefile.am
index 253378f..dba4d3e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -29,7 +29,7 @@ dist-hook:
>$(distdir)/cl-t -- master $(top_srcdir)/m4; \
rm -f $(distdir)/ChangeLog; \
mv $(distdir)/cl-t $(distdir)/ChangeLog; \
- $(top_srcdir)/git-authors-gen.pl >$(distdir)/au-t; \
+ $(top_srcdir)/gen-authors.sh >$(distdir)/au-t; \
rm -f $(distdir)/AUTHORS; \
mv $(distdir)/au-t $(distdir)/AUTHORS; \
fi
diff --git a/TODO b/TODO
index 5c8bc6b..67c961a 100644
--- a/TODO
+++ b/TODO
@@ -22,13 +22,6 @@
been changed in Git. Other branches, like 'maint', aren't tracked; there is
only a moderate amount of traffic.
-* TODO Auto-generate the AUTHORS file [1/2]
-
- The file should contain:
-
- * [X] people who committed to the git repository
- * [ ] people who are listed in m4 file copyright lines
-
* TODO Improve submission guide lines on the web site
** New submissions should use an AX_ prefix.
diff --git a/bootstrap.sh b/bootstrap.sh
index 9d2f96d..fe1d105 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -18,7 +18,7 @@ sed -i -e 's/^sc_file_system:/disabled_sc_file_system:/' \
-e 's/^sc_prohibit_magic_number_exit:/disabled_sc_prohibit_magic_number_exit:/' \
maint.mk
-./git-authors-gen.pl >AUTHORS
+./gen-authors.sh >AUTHORS
build-aux/gitlog-to-changelog >ChangeLog -- master m4/
autoreconf --install -Wall
diff --git a/gen-authors.sh b/gen-authors.sh
new file mode 100755
index 0000000..41905b7
--- /dev/null
+++ b/gen-authors.sh
@@ -0,0 +1,21 @@
+#! /bin/bash
+
+set -eu
+
+trap 'rm -f AUTHORS-m4.tmp AUTHORS-git.tmp' 0
+
+sed -n -e 's/# *Copyright (c) [0-9,-]* *//p' m4/*.m4 >AUTHORS-m4.tmp
+git log | sed -n -e 's/^Author: *//p' >AUTHORS-git.tmp
+
+cat AUTHORS-m4.tmp AUTHORS-git.tmp \
+ | sed -e 's/ *<.*>.*//' \
+ -e 's/^Bogdan$/Bogdan Drozdowski/' \
+ -e 's/Fabien COELHO/Fabien Coelho/' \
+ -e 's/Dustin Mitchell/Dustin J. Mitchell/' \
+ -e 's/Alain BARBET/Alain Barbet/' \
+ -e 's/Mats Kindahl of Sun Microsystems/Mats Kindahl/' \
+ -e 's/Perceval ANICHINI/Perceval Anichini/' \
+ -e 's/Rafa Rzepecki/Rafal Rzepecki/' \
+ -e '/Zmanda Inc./d' \
+ | sort \
+ | uniq
diff --git a/git-authors-gen.pl b/git-authors-gen.pl
deleted file mode 100755
index aae7a65..0000000
--- a/git-authors-gen.pl
+++ /dev/null
@@ -1,105 +0,0 @@
-#! /usr/bin/env perl
-# -*- perl -*-
-
-#
-# git-authors-gen
-#
-# This program is based on gitlog-to-changelog by Jim Meyering
-#
-
-use strict;
-use warnings;
-use Getopt::Long;
-
-(my $ME = $0) =~ s|.*/||;
-
-my $BUGREPORT = 'autoconf-archive-maintainers@nongnu.org';
-
-sub usage ($) {
- my ($exit_code) = @_;
- my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR);
- if ($exit_code != 0) {
- print $STREAM "Try `$ME --help' for more information.\n";
- } else {
- print $STREAM <<EOF;
-Usage: $ME [OPTIONS]
-
-Output git committers.
-
-OPTIONS:
-
- --since=DATE convert only the logs since DATE;
- the default is to convert all log entries.
- -h, --help display this help and exit
-
-EXAMPLE:
-
- $ME --since=2008-01-02 > AUTHORS
-
-Report bugs to <${BUGREPORT}>
-EOF
- }
- exit($exit_code);
-}
-
-# If the string $S is a well-behaved file name, simply return it.
-# If it contains white space, quotes, etc., quote it, and return the new string.
-sub shell_quote($) {
- my ($s) = @_;
- if ($s =~ m![^\w+/.,-]!) {
- # Convert each single quote to '\''
- $s =~ s/\'/\'\\\'\'/g;
- # Then single quote the string.
- $s = "'$s'";
- }
- return $s;
-}
-
-sub quoted_cmd(@) {
- return join (' ', map {shell_quote $_} @_);
-}
-
-# Main
-{
- my $since_date = '1970-01-01 UTC';
- GetOptions(
- 'h|help' => sub { usage 0 },
- 'since=s' => \$since_date,
- ) or usage 1;
-
- @ARGV
- and (warn "$ME: too many arguments\n"), usage 1;
-
- my @cmd = (qw (git shortlog --summary), "--since=$since_date");
- open PIPE, '-|', @cmd
- or die ("$ME: failed to run `". quoted_cmd (@cmd) ."': $!\n" .
- "(Is your Git too old? Version 1.5.1 or later required.)\n");
-
- my %committers;
-
- while (<PIPE>) {
- my $line = $_;
-
- defined($line) or last;
- chomp($line);
-
- if ($line =~ /^\s*\d+\s+(.*)\s*$/) {
- my $name = $1;
-
- if (defined($committers{$name})) {
- die "$ME: Duplicated name found, fix your .mailmap";
- }
- $committers{$name} = 1;
- } else {
- die "$ME: Unhandled line found ('$line')";
- }
- }
-
- close PIPE
- or die "$ME: error closing pipe from " . quoted_cmd (@cmd) . "\n";
-
- my @keys = sort(keys(%committers));
- foreach my $name (@keys) {
- print "$name\n";
- }
-}