Paul Eggert wrote: > > Prologue part 1 (2 lines with #!) > > Program short description > > Copyright and license notice > > Written-by notice > > Program short description (optional) > > Program long description > > Prologue part 2 > > Time stamp > > Code > > > > Would that be OK with you? > > Yes, that sounds OK, thanks.
Done like this: 2019-06-19 Bruno Haible <br...@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. diff --git a/build-aux/announce-gen b/build-aux/announce-gen index 5921dcc..8fe0cc8 100755 --- a/build-aux/announce-gen +++ b/build-aux/announce-gen @@ -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() @@ -15,33 +35,13 @@ 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); diff --git a/build-aux/gitlog-to-changelog b/build-aux/gitlog-to-changelog index 40b839e..3acfa8b 100755 --- a/build-aux/gitlog-to-changelog +++ b/build-aux/gitlog-to-changelog @@ -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() @@ -15,31 +35,12 @@ 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; diff --git a/build-aux/prefix-gnulib-mk b/build-aux/prefix-gnulib-mk index f3ca725..445d916 100755 --- a/build-aux/prefix-gnulib-mk +++ b/build-aux/prefix-gnulib-mk @@ -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() @@ -15,12 +35,17 @@ 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; diff --git a/build-aux/update-copyright b/build-aux/update-copyright index 0bb482b..4a9ea7c 100755 --- a/build-aux/update-copyright +++ b/build-aux/update-copyright @@ -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" diff --git a/build-aux/useless-if-before-free b/build-aux/useless-if-before-free index 0e479a3..6ac8aa9 100755 --- a/build-aux/useless-if-before-free +++ b/build-aux/useless-if-before-free @@ -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() @@ -15,32 +36,12 @@ 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;