summaryrefslogtreecommitdiff
path: root/build-aux
diff options
context:
space:
mode:
authorGary V. Vaughan <gary@gnu.org>2014-10-29 13:54:19 +0000
committerGary V. Vaughan <gary@gnu.org>2014-10-29 17:55:45 +0000
commit48ef34c5b9c0a0adee4e09561d1d0005e444afb2 (patch)
tree2ad5bceec63207a9b124e01ad2e76788356f185f /build-aux
parentc77eea5f6c0592423d925131489cc7772e34cf0b (diff)
downloadlibtool-48ef34c5b9c0a0adee4e09561d1d0005e444afb2.tar.gz
maint: autogenerate THANKS.
More automation == less time wasted on menial tasks. * build-aux/thanks-gen: script inspired by coreutils. * Makefile.am (THANKS): Based on rule from coreutils/Makefile.am. * NO-THANKS: New file. Configure thanks-gen output. * THANKS: Remove. Signed-off-by: Gary V. Vaughan <gary@gnu.org>
Diffstat (limited to 'build-aux')
-rwxr-xr-xbuild-aux/thanks-gen20
1 files changed, 20 insertions, 0 deletions
diff --git a/build-aux/thanks-gen b/build-aux/thanks-gen
new file mode 100755
index 00000000..92090ced
--- /dev/null
+++ b/build-aux/thanks-gen
@@ -0,0 +1,20 @@
+#!/usr/bin/perl -nl
+# Use Perl's multi-byte alignment code, via sprintf, while
+# performing a rudimentary check for duplicate names and
+# removing duplicate name,email pairs.
+use Encode;
+
+BEGIN { my (%elide, %seen, %name) }
+
+chomp;
+my ($name, $email) = split '\0', decode ('UTF-8', $_);
+
+if ($elide{"!$name"}) {
+; # ignore this author
+} elsif (index ($name, '!') == 0) {
+ $elide{$name}++;
+} elsif ($seen{$name}++) {
+ warn "$0: NO-THANKS: duplicate name: $name\n";
+} else {
+ print encode ('UTF-8', sprintf ('%-36s', $name)), $email;
+}