mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-18 00:33:03 +00:00
maint: automate PACKAGE_COPYRIGHT_YEAR update, and update it.
* HACKING (Release Procedure): Update notes on copyright years. * Makefile.am (update-package-copyright-year): New target rule. * build-aux/update-package-copyright-year: New file. * cfg.mk (update-copyright): Add update-package-copyright-year as a dependency.
This commit is contained in:
@@ -1,3 +1,12 @@
|
|||||||
|
2010-01-21 Joel E. Denny <jdenny@clemson.edu>
|
||||||
|
|
||||||
|
maint: automate PACKAGE_COPYRIGHT_YEAR update, and update it.
|
||||||
|
* HACKING (Release Procedure): Update notes on copyright years.
|
||||||
|
* Makefile.am (update-package-copyright-year): New target rule.
|
||||||
|
* build-aux/update-package-copyright-year: New file.
|
||||||
|
* cfg.mk (update-copyright): Add update-package-copyright-year
|
||||||
|
as a dependency.
|
||||||
|
|
||||||
2010-01-19 Joel E. Denny <jdenny@clemson.edu>
|
2010-01-19 Joel E. Denny <jdenny@clemson.edu>
|
||||||
|
|
||||||
* bootstrap: Import improvements from latest gnulib.
|
* bootstrap: Import improvements from latest gnulib.
|
||||||
|
|||||||
17
HACKING
17
HACKING
@@ -210,9 +210,17 @@ causes it to be rejected by recent Gettext releases; please report
|
|||||||
these to the Translation Project.
|
these to the Translation Project.
|
||||||
|
|
||||||
** Update README
|
** Update README
|
||||||
Make sure the information in this file is current. Most notably, make sure it
|
Make sure the information in README is current. Most notably, make sure
|
||||||
recommends a version of GNU M4 that is compatible with the latest Bison
|
it recommends a version of GNU M4 that is compatible with the latest
|
||||||
sources.
|
Bison sources.
|
||||||
|
|
||||||
|
** Check copyright years.
|
||||||
|
We update years in copyright statements throughout Bison once at the
|
||||||
|
start of every year by running `make update-copyright'. However, before
|
||||||
|
a release, it's good to verify that it's actually been run. Besides the
|
||||||
|
copyright statement for each Bison file, check the copyright statements
|
||||||
|
that the skeletons insert into generated parsers, and check all
|
||||||
|
occurrences of PACKAGE_COPYRIGHT_YEAR in configure.ac.
|
||||||
|
|
||||||
** Update NEWS
|
** Update NEWS
|
||||||
The version number, *and* the date of the release (including for
|
The version number, *and* the date of the release (including for
|
||||||
@@ -221,9 +229,6 @@ betas).
|
|||||||
** Update ChangeLog
|
** Update ChangeLog
|
||||||
Should have an entry similar to `Version 1.49b.'.
|
Should have an entry similar to `Version 1.49b.'.
|
||||||
|
|
||||||
** Update configure.ac
|
|
||||||
Be sure PACKAGE_COPYRIGHT_YEAR is up-to-date.
|
|
||||||
|
|
||||||
** Tag the release
|
** Tag the release
|
||||||
Before Bison will build with the right version number, you must tag the release
|
Before Bison will build with the right version number, you must tag the release
|
||||||
in git. Do this after all other changes. The command is similar to:
|
in git. Do this after all other changes. The command is similar to:
|
||||||
|
|||||||
@@ -57,9 +57,11 @@ $(top_srcdir)/.version: configure
|
|||||||
dist-hook:
|
dist-hook:
|
||||||
echo $(VERSION) > $(distdir)/.tarball-version
|
echo $(VERSION) > $(distdir)/.tarball-version
|
||||||
|
|
||||||
.PHONY: update-b4-copyright
|
.PHONY: update-b4-copyright update-package-copyright-year
|
||||||
update-b4-copyright:
|
update-b4-copyright:
|
||||||
find data -type f \
|
find data -type f \
|
||||||
| grep -v -E '^data/bison.m4$$' \
|
| grep -v -E '^data/bison.m4$$' \
|
||||||
| xargs $(build_aux)/$@
|
| xargs $(build_aux)/$@
|
||||||
@echo 'warning: src/parse-gram.[hc] may need to be regenerated.'
|
@echo 'warning: src/parse-gram.[hc] may need to be regenerated.'
|
||||||
|
update-package-copyright-year:
|
||||||
|
$(build_aux)/$@ configure.ac
|
||||||
|
|||||||
49
build-aux/update-package-copyright-year
Executable file
49
build-aux/update-package-copyright-year
Executable file
@@ -0,0 +1,49 @@
|
|||||||
|
#!/usr/bin/perl -0777 -pi
|
||||||
|
|
||||||
|
# In configure.ac, update PACKAGE_COPYRIGHT_YEAR to the current year.
|
||||||
|
|
||||||
|
# Copyright (C) 2010 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, 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 <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
|
||||||
|
my $this_year = $ENV{UPDATE_COPYRIGHT_YEAR};
|
||||||
|
if (!$this_year || $this_year !~ m/^\d{4}$/)
|
||||||
|
{
|
||||||
|
my ($sec, $min, $hour, $mday, $month, $year) = localtime (time ());
|
||||||
|
$this_year = $year + 1900;
|
||||||
|
}
|
||||||
|
my $old_re = <<'EOF'
|
||||||
|
(
|
||||||
|
MACRO\(
|
||||||
|
\[PACKAGE_COPYRIGHT_YEAR],
|
||||||
|
\s*\[
|
||||||
|
)
|
||||||
|
(\d{4})
|
||||||
|
(?=])
|
||||||
|
EOF
|
||||||
|
;
|
||||||
|
foreach my $macro ("AC_DEFINE", "AC_SUBST")
|
||||||
|
{
|
||||||
|
my $this_old_re = $old_re;
|
||||||
|
$this_old_re =~ s/MACRO/$macro/;
|
||||||
|
if (!s/$this_old_re/$1$this_year/x)
|
||||||
|
{
|
||||||
|
print STDERR
|
||||||
|
"$ARGV: warning: failed to update PACKAGE_COPYRIGHT_YEAR in"
|
||||||
|
. " $macro.\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
2
cfg.mk
2
cfg.mk
@@ -43,6 +43,6 @@ gnulib_dir = $(srcdir)/../../gnulib
|
|||||||
|
|
||||||
bootstrap-tools = autoconf,automake,flex,gnulib
|
bootstrap-tools = autoconf,automake,flex,gnulib
|
||||||
|
|
||||||
update-copyright: update-b4-copyright
|
update-copyright: update-b4-copyright update-package-copyright-year
|
||||||
update-copyright-env = \
|
update-copyright-env = \
|
||||||
UPDATE_COPYRIGHT_FORCE=1 UPDATE_COPYRIGHT_USE_INTERVALS=1
|
UPDATE_COPYRIGHT_FORCE=1 UPDATE_COPYRIGHT_USE_INTERVALS=1
|
||||||
|
|||||||
@@ -21,9 +21,9 @@ AC_PREREQ(2.61)
|
|||||||
AC_INIT([GNU Bison],
|
AC_INIT([GNU Bison],
|
||||||
m4_esyscmd([build-aux/git-version-gen .tarball-version]),
|
m4_esyscmd([build-aux/git-version-gen .tarball-version]),
|
||||||
[bug-bison@gnu.org])
|
[bug-bison@gnu.org])
|
||||||
AC_DEFINE([PACKAGE_COPYRIGHT_YEAR], [2008],
|
AC_DEFINE([PACKAGE_COPYRIGHT_YEAR], [2010],
|
||||||
[The copyright year for this package])
|
[The copyright year for this package])
|
||||||
AC_SUBST([PACKAGE_COPYRIGHT_YEAR], [2008])
|
AC_SUBST([PACKAGE_COPYRIGHT_YEAR], [2010])
|
||||||
|
|
||||||
AC_CONFIG_AUX_DIR([build-aux])
|
AC_CONFIG_AUX_DIR([build-aux])
|
||||||
AC_CONFIG_MACRO_DIR([m4])
|
AC_CONFIG_MACRO_DIR([m4])
|
||||||
|
|||||||
Reference in New Issue
Block a user