]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
announce-gen: Implement --version option according to GCS.
authorBruno Haible <bruno@clisp.org>
Sun, 11 Apr 2021 12:17:13 +0000 (14:17 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 11 Apr 2021 12:17:13 +0000 (14:17 +0200)
* build-aux/announce-gen (copyright_year): New variable.
(GetOptions): Print also a short copyright and license notice and
author statement.

ChangeLog
build-aux/announce-gen

index 197ce80f4f4e88a966368d142a5fc5650a6d1075..d6e0f72266e7ebd31f44b1e8a573593385130e62 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2021-04-11  Bruno Haible  <bruno@clisp.org>
+
+       announce-gen: Implement --version option according to GCS.
+       * build-aux/announce-gen (copyright_year): New variable.
+       (GetOptions): Print also a short copyright and license notice and
+       author statement.
+
 2021-04-10  Bruno Haible  <bruno@clisp.org>
 
        Simplify GNULIB_* variable initializations.
index 84d2d637815c18c386545cbee277a80c83f231fb..daa478c8ef01a875ad02d555b502fd23ecb64405 100755 (executable)
 eval 'exec perl -wSx "$0" "$@"'
      if 0;
 
-my $VERSION = '2020-05-10 16:13'; # UTC
+my $VERSION = '2021-04-11 8:42'; # UTC
 # The definition above must lie within the first 8 lines in order
 # for the Emacs time-stamp write hook (at end) to update it.
 # If you change this file with Emacs, please let the write hook
 # do its job.  Otherwise, update this string manually.
 
+my $copyright_year = '2021';
+
 use strict;
 use Getopt::Long;
 use POSIX qw(strftime);
@@ -413,7 +415,19 @@ sub get_tool_versions ($$)
      'archive-suffix=s'   => \@archive_suffixes,
 
      help => sub { usage 0 },
-     version => sub { print "$ME version $VERSION\n"; exit },
+     version =>
+       sub
+       {
+         print "$ME version $VERSION\n";
+         print "Copyright (C) $copyright_year Free Software Foundation, Inc.\n";
+         print "License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.\n"
+             . "This is free software: you are free to change and redistribute it.\n"
+             . "There is NO WARRANTY, to the extent permitted by law.\n";
+         print "\n";
+         my $author = "Jim Meyering";
+         print "Written by $author.\n";
+         exit
+       },
     ) or usage 1;
 
   my $fail = 0;