]> Savannah Git Hosting - gnulib.git/commitdiff
Reorder pieces of header in perl scripts.
authorBruno Haible <bruno@clisp.org>
Wed, 19 Jun 2019 10:06:23 +0000 (12:06 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 19 Jun 2019 10:06:23 +0000 (12:06 +0200)
The desired order is
- Prologue part 1 (2 lines with #!)
- Program short description
- Copyright and license notice
- Written-by notice
- Program short description (optional)
- Program long description (optional)
- Prologue part 2
- Time stamp
- Code

Reported by Paul Eggert.

* build-aux/announce-gen: Reorder header.
* build-aux/gitlog-to-changelog: Likewise.
* build-aux/useless-if-before-free: Likewise.
* build-aux/prefix-gnulib-mk: Add copyright notice and short
description.
* build-aux/update-copyright: Likewise. Add short description. Bump
time-stamp-line-limit to 200.

ChangeLog
build-aux/announce-gen
build-aux/gitlog-to-changelog
build-aux/prefix-gnulib-mk
build-aux/update-copyright
build-aux/useless-if-before-free

index c76ac88525ebb7e5b69542f42ed190ecc71d795d..700ee2f1cbf7fb20ebffbb1b14b3bb99b509e6b7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,25 @@
+2019-06-19  Bruno Haible  <bruno@clisp.org>
+
+       Reorder pieces of header in perl scripts.
+       The desired order is
+       - Prologue part 1 (2 lines with #!)
+       - Program short description
+       - Copyright and license notice
+       - Written-by notice
+       - Program short description (optional)
+       - Program long description (optional)
+       - Prologue part 2
+       - Time stamp
+       - Code
+       Reported by Paul Eggert.
+       * build-aux/announce-gen: Reorder header.
+       * build-aux/gitlog-to-changelog: Likewise.
+       * build-aux/useless-if-before-free: Likewise.
+       * build-aux/prefix-gnulib-mk: Add copyright notice and short
+       description.
+       * build-aux/update-copyright: Likewise. Add short description. Bump
+       time-stamp-line-limit to 200.
+
 2019-06-18  Paul Eggert  <eggert@cs.ucla.edu>
 
        verify-tests: work around xlc bug
index 5921dcc0c916c3e18ddbd63ddfa56410322ee3cb..8fe0cc8c4b1a8c0ca32afe1b3dc1627a6655f067 100755 (executable)
@@ -1,5 +1,25 @@
 #!/bin/sh
 #! -*-perl-*-
+
+# Generate a release announcement message.
+
+# Copyright (C) 2002-2019 Free Software Foundation, Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <https://www.gnu.org/licenses/>.
+#
+# Written by Jim Meyering
+
 # This is a prologue that allows to run a perl script as an executable
 # on systems that are compliant to a POSIX version before POSIX:2017.
 # On such systems, the usual invocation of an executable through execlp()
 eval 'exec perl -wSx "$0" "$@"'
      if 0;
 
-# Generate a release announcement message.
-
 my $VERSION = '2018-03-07 03:46'; # 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.
 
-# Copyright (C) 2002-2019 Free Software Foundation, Inc.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <https://www.gnu.org/licenses/>.
-
-# Written by Jim Meyering
-
 use strict;
-
 use Getopt::Long;
 use POSIX qw(strftime);
 
index 40b839e1e2e26d7aca1617d651eb4540b9d89d35..3acfa8b4c5b67bc050e587470eac9987cc862f00 100755 (executable)
@@ -1,5 +1,25 @@
 #!/bin/sh
 #! -*-perl-*-
+
+# Convert git log output to ChangeLog format.
+
+# Copyright (C) 2008-2019 Free Software Foundation, Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <https://www.gnu.org/licenses/>.
+#
+# Written by Jim Meyering
+
 # This is a prologue that allows to run a perl script as an executable
 # on systems that are compliant to a POSIX version before POSIX:2017.
 # On such systems, the usual invocation of an executable through execlp()
 eval 'exec perl -wSx "$0" "$@"'
      if 0;
 
-# Convert git log output to ChangeLog format.
-
 my $VERSION = '2018-03-07 03:47'; # 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.
 
-# Copyright (C) 2008-2019 Free Software Foundation, Inc.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <https://www.gnu.org/licenses/>.
-
-# Written by Jim Meyering
-
 use strict;
 use warnings;
 use Getopt::Long;
index f3ca725174d040530f8799142f3c41886ae4872c..445d91610e6075d2f1ddfed3395fd739b72f5b02 100755 (executable)
@@ -1,5 +1,25 @@
 #!/bin/sh
 #! -*-perl-*-
+
+# Rewrite a gnulib.mk, adding prefixes to work with automake's subdir-objects.
+
+# Copyright (C) 2012-2019 Free Software Foundation, Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <https://www.gnu.org/licenses/>.
+#
+# Written by Jim Meyering
+
 # This is a prologue that allows to run a perl script as an executable
 # on systems that are compliant to a POSIX version before POSIX:2017.
 # On such systems, the usual invocation of an executable through execlp()
 eval 'exec perl -wSx "$0" "$@"'
      if 0;
 
+my $VERSION = '2012-01-21 17:13'; # 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.
+
 use strict;
 use IO::File;
 use Getopt::Long;
 use File::Basename; # for dirname
 
-my $VERSION = '2012-01-21 17:13'; # UTC
 (my $ME = $0) =~ s|.*/||;
 
 my $prefix;
index 0bb482b3628986a9b0c03723e136dc47fca68bbe..4a9ea7c7a75749751393b90e6799c0330ca427e6 100755 (executable)
@@ -1,24 +1,8 @@
 #!/bin/sh
 #! -*-perl-*-
-# This is a prologue that allows to run a perl script as an executable
-# on systems that are compliant to a POSIX version before POSIX:2017.
-# On such systems, the usual invocation of an executable through execlp()
-# or execvp() fails with ENOEXEC if it is a script that does not start
-# with a #! line.  The script interpreter mentioned in the #! line has
-# to be /bin/sh, because on GuixSD systems that is the only program that
-# has a fixed file name.  The second line is essential for perl and is
-# also useful for editing this file in Emacs.  The next two lines below
-# are valid code in both sh and perl.  When executed by sh, they re-execute
-# the script through the perl program found in $PATH.  The '-x' option
-# is essential as well; without it, perl would re-execute the script
-# through /bin/sh.  When executed by  perl, the next two lines are a no-op.
-eval 'exec perl -wSx "$0" "$@"'
-     if 0;
 
 # Update an FSF copyright year list to include the current year.
 
-my $VERSION = '2018-03-07.03:47'; # UTC
-
 # Copyright (C) 2009-2019 Free Software Foundation, Inc.
 #
 # This program is free software: you can redistribute it and/or modify
@@ -33,9 +17,12 @@ my $VERSION = '2018-03-07.03:47'; # UTC
 #
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
-
+#
 # Written by Jim Meyering and Joel E. Denny
 
+# This script updates an FSF copyright year list to include the current year.
+# Usage: update-copyright [FILE...]
+#
 # The arguments to this script should be names of files that contain
 # copyright statements to be updated.  The copyright holder's name
 # defaults to "Free Software Foundation, Inc." but may be changed to
@@ -135,6 +122,27 @@ my $VERSION = '2018-03-07.03:47'; # UTC
 #   5. Set UPDATE_COPYRIGHT_HOLDER if the copyright holder is other
 #      than "Free Software Foundation, Inc.".
 
+# This is a prologue that allows to run a perl script as an executable
+# on systems that are compliant to a POSIX version before POSIX:2017.
+# On such systems, the usual invocation of an executable through execlp()
+# or execvp() fails with ENOEXEC if it is a script that does not start
+# with a #! line.  The script interpreter mentioned in the #! line has
+# to be /bin/sh, because on GuixSD systems that is the only program that
+# has a fixed file name.  The second line is essential for perl and is
+# also useful for editing this file in Emacs.  The next two lines below
+# are valid code in both sh and perl.  When executed by sh, they re-execute
+# the script through the perl program found in $PATH.  The '-x' option
+# is essential as well; without it, perl would re-execute the script
+# through /bin/sh.  When executed by  perl, the next two lines are a no-op.
+eval 'exec perl -wSx "$0" "$@"'
+     if 0;
+
+my $VERSION = '2018-03-07.03:47'; # 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.
+
 use strict;
 use warnings;
 
@@ -284,7 +292,7 @@ else
 # mode: perl
 # indent-tabs-mode: nil
 # eval: (add-hook 'before-save-hook 'time-stamp)
-# time-stamp-line-limit: 50
+# time-stamp-line-limit: 200
 # time-stamp-start: "my $VERSION = '"
 # time-stamp-format: "%:y-%02m-%02d.%02H:%02M"
 # time-stamp-time-zone: "UTC0"
index 0e479a34b4d7f7bf2dfb3153b57a999447085c5a..6ac8aa91967141adf3201d1f2a06d0c7bc21f764 100755 (executable)
@@ -1,5 +1,26 @@
 #!/bin/sh
 #! -*-perl-*-
+
+# Detect instances of "if (p) free (p);".
+# Likewise "if (p != 0)", "if (0 != p)", or with NULL; and with braces.
+
+# Copyright (C) 2008-2019 Free Software Foundation, Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <https://www.gnu.org/licenses/>.
+#
+# Written by Jim Meyering
+
 # This is a prologue that allows to run a perl script as an executable
 # on systems that are compliant to a POSIX version before POSIX:2017.
 # On such systems, the usual invocation of an executable through execlp()
 eval 'exec perl -wSx "$0" "$@"'
      if 0;
 
-# Detect instances of "if (p) free (p);".
-# Likewise "if (p != 0)", "if (0 != p)", or with NULL; and with braces.
-
 my $VERSION = '2018-03-07 03:47'; # 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.
 
-# Copyright (C) 2008-2019 Free Software Foundation, Inc.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <https://www.gnu.org/licenses/>.
-
-# Written by Jim Meyering
-
 use strict;
 use warnings;
 use Getopt::Long;