Re: announce-gen: Fix copyright year in --version output.

2024-07-17 Thread Collin Funk
Bruno Haible writes: > How about deriving the --version output from the copyright notice, for > those programs that consist of a single file and that are not written in C? [...] > + # Extract the last year from this file's copyright notice. > + sed_extract_last_year='s/^.*\([0-9]\{4\}\)[^0-9]*$

Re: announce-gen: Fix copyright year in --version output.

2024-07-17 Thread Bruno Haible
Collin Funk wrote: > The announce-gen and useless-if-before-free scripts have had changes > since their copyright date was updated: How about deriving the --version output from the copyright notice, for those programs that consist of a single file and that are not written in C? Like this: diff -

Re: announce-gen: Fix copyright year in --version output.

2024-07-17 Thread Bruno Haible
Hi Simon, > > The GNU Maintainers Guide and the GNU Coding Standards have different > > sections > > - about the copyright notice in source files > > https://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html > > - about the --version output of programs > > https://www.gnu.org

Re: announce-gen: Fix copyright year in --version output.

2024-07-17 Thread Simon Josefsson via Gnulib discussion list
Bruno Haible writes: > Simon Josefsson wrote: >> > Maybe, I am misreading but I think using $VERSION makes more sense >> > according to the GNU Coding Standards [1]: >> > >> > This copyright notice only needs to mention the most recent year in >> > which changes were made—there’s no need

Re: announce-gen: Fix copyright year in --version output.

2024-07-16 Thread Bruno Haible
Simon Josefsson wrote: > > Maybe, I am misreading but I think using $VERSION makes more sense > > according to the GNU Coding Standards [1]: > > > > This copyright notice only needs to mention the most recent year in > > which changes were made—there’s no need to list the years for previous

Re: announce-gen: Fix copyright year in --version output.

2024-07-16 Thread Simon Josefsson via Gnulib discussion list
Collin Funk writes: > Hi Simon, > > Simon Josefsson writes: > >> That's better, but doesn't all this just hides the problem that 'make >> update-copyright' doesn't bump the copyright for these two files? I >> think the policy is to bump copyright year to 2025 as soon as possible >> after 2025-0

Re: announce-gen: Fix copyright year in --version output.

2024-07-14 Thread Collin Funk
Hi Simon, Simon Josefsson writes: > That's better, but doesn't all this just hides the problem that 'make > update-copyright' doesn't bump the copyright for these two files? I > think the policy is to bump copyright year to 2025 as soon as possible > after 2025-01-01 even if there are no other

Re: announce-gen: Fix copyright year in --version output.

2024-07-14 Thread Simon Josefsson via Gnulib discussion list
Collin Funk writes: > Hi Bruno, > > Bruno Haible writes: > >> Can this be rewritten in a simpler way, that does not use idioms >> from perl's bag of tricks? Something like >> >> my $copyright_year = ; >> >> like one would do it in every other programming language? > > Not sure. I'm not the mos

Re: announce-gen: Fix copyright year in --version output.

2024-07-13 Thread Collin Funk
Hi Bruno, Bruno Haible writes: > Can this be rewritten in a simpler way, that does not use idioms > from perl's bag of tricks? Something like > > my $copyright_year = ; > > like one would do it in every other programming language? Not sure. I'm not the most knowledgeable perl programmer. Mayb

Re: announce-gen: Fix copyright year in --version output.

2024-07-13 Thread Bruno Haible
Hi Collin, > I've pushed the two attached patches to derive the copyright year from > the time-stamp string. > +(my $copyright_year = $VERSION) =~ s/^(\d*)-.*$/$1/; Can this be rewritten in a simpler way, that does not use idioms from perl's bag of tricks? Something like my $copyright_year =

announce-gen: Fix copyright year in --version output.

2024-07-13 Thread Collin Funk
e the copyright year from the time-stamp string. Collin >From 8b331b0f514e1eb9a2e46076b2ae6326751bb7c9 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Sat, 13 Jul 2024 20:10:46 -0700 Subject: [PATCH 1/2] announce-gen: Fix copyright year in --version output. * build-aux/announce-gen (copyri