mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 20:33:03 +00:00
maint: fix use of copyright year intervals.
* gnulib: Update.
* bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
as now recommended in gnulib/NEWS.
* build-aux/update-b4-copyright: Fix.
* cfg.mk (update-copyright-env): Configure update-copyright.
(cherry picked from commit 75ac158b82)
This commit is contained in:
@@ -1,3 +1,12 @@
|
|||||||
|
2009-08-14 Joel E. Denny <jdenny@clemson.edu>
|
||||||
|
|
||||||
|
maint: fix use of copyright year intervals.
|
||||||
|
* gnulib: Update.
|
||||||
|
* bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
|
||||||
|
as now recommended in gnulib/NEWS.
|
||||||
|
* build-aux/update-b4-copyright: Fix.
|
||||||
|
* cfg.mk (update-copyright-env): Configure update-copyright.
|
||||||
|
|
||||||
2009-08-13 Joel E. Denny <jdenny@clemson.edu>
|
2009-08-13 Joel E. Denny <jdenny@clemson.edu>
|
||||||
|
|
||||||
Make it easier to write deterministic tests.
|
Make it easier to write deterministic tests.
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
# gnulib modules used by this package.
|
# gnulib modules used by this package.
|
||||||
gnulib_modules='
|
gnulib_modules='
|
||||||
announce-gen argmatch config-h c-strcase configmake dirname error
|
announce-gen argmatch config-h c-strcase configmake dirname error
|
||||||
extensions fopen-safer gendocs getopt gettext git-version-gen hash
|
extensions fopen-safer gendocs getopt-gnu gettext git-version-gen hash
|
||||||
inttypes javacomp-script javaexec-script maintainer-makefile malloc
|
inttypes javacomp-script javaexec-script maintainer-makefile malloc
|
||||||
mbswidth obstack quote quotearg stdbool stpcpy strerror strtoul
|
mbswidth obstack quote quotearg stdbool stpcpy strerror strtoul
|
||||||
strverscmp unistd unistd-safer unlocked-io update-copyright unsetenv
|
strverscmp unistd unistd-safer unlocked-io update-copyright unsetenv
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ my $old_re = <<'EOF'
|
|||||||
(?:
|
(?:
|
||||||
,\s*
|
,\s*
|
||||||
(
|
(
|
||||||
\[\s* (?:\d{4}(,\s*|-))* (\d{4}) \s*]
|
\[\s* (?:\d{4}(?:,\s*|-))* (\d{4}) \s*]
|
||||||
)
|
)
|
||||||
)?
|
)?
|
||||||
\)
|
\)
|
||||||
@@ -54,8 +54,7 @@ while (/($old_re)/gx)
|
|||||||
my $start = pos() - length ($1);
|
my $start = pos() - length ($1);
|
||||||
my $b4_copyright_line = $2;
|
my $b4_copyright_line = $2;
|
||||||
my $year_lines = $3;
|
my $year_lines = $3;
|
||||||
my $sep = $4 ? $4 : "";
|
my $final_year = $4;
|
||||||
my $final_year = $5;
|
|
||||||
$year_lines .= ')';
|
$year_lines .= ')';
|
||||||
|
|
||||||
# If there was a second argument, it contains years, so update them.
|
# If there was a second argument, it contains years, so update them.
|
||||||
@@ -65,18 +64,7 @@ while (/($old_re)/gx)
|
|||||||
if ($final_year != $this_year)
|
if ($final_year != $this_year)
|
||||||
{
|
{
|
||||||
# Update the year.
|
# Update the year.
|
||||||
if ($sep eq '-' && $final_year + 1 == $this_year)
|
$year_lines =~ s/$final_year/$final_year, $this_year/;
|
||||||
{
|
|
||||||
$year_lines =~ s/$final_year/$this_year/;
|
|
||||||
}
|
|
||||||
elsif ($sep ne '-' && $final_year + 1 == $this_year)
|
|
||||||
{
|
|
||||||
$year_lines =~ s/$final_year/$final_year-$this_year/;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$year_lines =~ s/$final_year/$final_year, $this_year/;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Normalize all whitespace.
|
# Normalize all whitespace.
|
||||||
@@ -85,6 +73,20 @@ while (/($old_re)/gx)
|
|||||||
# Put spaces after commas.
|
# Put spaces after commas.
|
||||||
$year_lines =~ s/, ?/, /g;
|
$year_lines =~ s/, ?/, /g;
|
||||||
|
|
||||||
|
# Compress to intervals.
|
||||||
|
$year_lines =~
|
||||||
|
s/
|
||||||
|
(\d{4})
|
||||||
|
(?:
|
||||||
|
(,\ |-)
|
||||||
|
((??{
|
||||||
|
if ($2 eq '-') { '\d{4}'; }
|
||||||
|
elsif (!$3) { $1 + 1; }
|
||||||
|
else { $3 + 1; }
|
||||||
|
}))
|
||||||
|
)+
|
||||||
|
/$1-$3/gx;
|
||||||
|
|
||||||
# Format within margin.
|
# Format within margin.
|
||||||
my $year_lines_new;
|
my $year_lines_new;
|
||||||
my $indent = index ($b4_copyright_line, '[');
|
my $indent = index ($b4_copyright_line, '[');
|
||||||
|
|||||||
2
cfg.mk
2
cfg.mk
@@ -44,3 +44,5 @@ gnulib_dir = $(srcdir)/../../gnulib
|
|||||||
bootstrap-tools = autoconf,automake,flex,gnulib
|
bootstrap-tools = autoconf,automake,flex,gnulib
|
||||||
|
|
||||||
update-copyright-local = update-b4-copyright
|
update-copyright-local = update-b4-copyright
|
||||||
|
update-copyright-env = \
|
||||||
|
UPDATE_COPYRIGHT_FORCE=1 UPDATE_COPYRIGHT_USE_INTERVALS=1
|
||||||
|
|||||||
2
gnulib
2
gnulib
Submodule gnulib updated: 109f294207...e98f3a0b6b
@@ -64,6 +64,7 @@ stamp-h1
|
|||||||
stdbool.h
|
stdbool.h
|
||||||
stdbool.in.h
|
stdbool.in.h
|
||||||
stdbool_.h
|
stdbool_.h
|
||||||
|
stddef.in.h
|
||||||
stdint.h
|
stdint.h
|
||||||
stdint.in.h
|
stdint.in.h
|
||||||
stdint_.h
|
stdint_.h
|
||||||
|
|||||||
1
lib/.gitignore
vendored
1
lib/.gitignore
vendored
@@ -67,6 +67,7 @@
|
|||||||
/stdbool.h
|
/stdbool.h
|
||||||
/stdbool.in.h
|
/stdbool.in.h
|
||||||
/stdbool_.h
|
/stdbool_.h
|
||||||
|
/stddef.in.h
|
||||||
/stdint.h
|
/stdint.h
|
||||||
/stdint.in.h
|
/stdint.in.h
|
||||||
/stdint_.h
|
/stdint_.h
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ quote.m4
|
|||||||
quotearg.m4
|
quotearg.m4
|
||||||
setenv.m4
|
setenv.m4
|
||||||
stdbool.m4
|
stdbool.m4
|
||||||
|
stddef_h.m4
|
||||||
stdint.m4
|
stdint.m4
|
||||||
stdint_h.m4
|
stdint_h.m4
|
||||||
stdio-safer.m4
|
stdio-safer.m4
|
||||||
|
|||||||
1
m4/.gitignore
vendored
1
m4/.gitignore
vendored
@@ -50,6 +50,7 @@
|
|||||||
/quotearg.m4
|
/quotearg.m4
|
||||||
/setenv.m4
|
/setenv.m4
|
||||||
/stdbool.m4
|
/stdbool.m4
|
||||||
|
/stddef_h.m4
|
||||||
/stdint.m4
|
/stdint.m4
|
||||||
/stdint_h.m4
|
/stdint_h.m4
|
||||||
/stdio-safer.m4
|
/stdio-safer.m4
|
||||||
|
|||||||
Reference in New Issue
Block a user