* build-aux/update-b4-copyright: In warnings, report line
numbers rather than character positions.
* cfg.mk (update-copyright-local): Set to update-b4-copyright so
that update-copyright runs it.
* gnulib: Update.
(cherry picked from commit
a1a9422d4a2f70ff89e06318ba154851c3700f60)
+2009-08-06 Joel E. Denny <jdenny@clemson.edu>
+
+ maint: make update-b4-copyright easier to use
+ * build-aux/update-b4-copyright: In warnings, report line
+ numbers rather than character positions.
+ * cfg.mk (update-copyright-local): Set to update-b4-copyright so
+ that update-copyright runs it.
+ * gnulib: Update.
+
2009-08-05 Joel E. Denny <jdenny@clemson.edu>
maint: clean up update-b4-copyright code
2009-08-05 Joel E. Denny <jdenny@clemson.edu>
maint: clean up update-b4-copyright code
while (/(\bb4_copyright\()/g)
{
while (/(\bb4_copyright\()/g)
{
- my $pos = pos ();
- pos () -= length ($1);
+ my $start = pos () - length ($1);
+ my $end = pos ();
$re =~ s/\#BEFORE/\\G/;
if (!/$re/x)
{
$re =~ s/\#BEFORE/\\G/;
if (!/$re/x)
{
+ my $line = (substr ($_, 0, $start) =~ s/\n/\n/g) + 1;
- "$ARGV: warning: failed to update a b4_copyright before char"
- . " $pos\n";
+ "$ARGV:$line: warning: failed to update a b4_copyright\n";
-while (/\[b4_copyright_years]/g)
+while (/(\[b4_copyright_years])/g)
+ my $start = pos () - length ($1);
+ my $end = pos ();
my $re = $old_re;
$re =~ s/\#AFTER/\\G/;
if (!/$re/x)
{
my $re = $old_re;
$re =~ s/\#AFTER/\\G/;
if (!/$re/x)
{
+ # The substr operation blows away pos (), so restoring pos ()
+ # at the end is necessary.
+ my $line = (substr ($_, 0, $start) =~ s/\n/\n/g) + 1;
- "$ARGV: warning: failed to update a b4_copyright_years before"
- . " char $pos\n";
+ "$ARGV:$line: warning: failed to update a"
+ . " b4_copyright_years\n";
gnulib_dir = $(srcdir)/../../gnulib
bootstrap-tools = autoconf,automake,flex,gnulib
gnulib_dir = $(srcdir)/../../gnulib
bootstrap-tools = autoconf,automake,flex,gnulib
+
+update-copyright-local = update-b4-copyright
-Subproject commit 8bdaa78f311ff9e5e03ff37ee5f546af14913802
+Subproject commit 109f2942075bba4454bd92141b1803cf1b79684c