This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [committed] Update copyright years, part 2
- From: Richard Sandiford <richard dot sandiford at arm dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, David Malcolm <dmalcolm at redhat dot com>
- Date: Tue, 13 Jan 2015 17:06:35 +0000
- Subject: Re: [committed] Update copyright years, part 2
- Authentication-results: sourceware.org; auth=none
- References: <20150105123924 dot GR1667 at tucnak dot redhat dot com>
Jakub Jelinek <jakub@redhat.com> writes:
> Patch too large to attach uncompressed, this
> has been created with update-copyright.py --this-year.
> Note, I had to temporarily move away gcc/jit/docs/conf.py,
> the python script dies on that and leaves almost all files unchanged.
Thanks for doing the update. Is the patch below OK to fix the JIT thing?
After this change, update-copyright.py --this-year seems to update
gcc/jit correctly (including the texinfo files).
Richard
contrib/
* update-copyright.py (Copyright.__init__): Add a regexp for
"copyright = u'".
(Copyright.update_copyright): Don't add a space before the year
in that case.
Index: contrib/update-copyright.py
===================================================================
--- contrib/update-copyright.py 2014-08-05 10:29:02.695491816 +0100
+++ contrib/update-copyright.py 2015-01-13 14:13:43.500812967 +0000
@@ -183,6 +183,7 @@ class Copyright:
'|[Cc]opyright\s+%s'
'|[Cc]opyright\s+©'
'|[Cc]opyright\s+@copyright{}'
+ '|copyright = u\''
'|@set\s+copyright[\w-]+)'
# 2: the years. Include the whitespace in the year, so that
@@ -363,7 +364,8 @@ class Copyright:
return (False, orig_line, next_line)
line = (line[:match.start (2)]
- + ' ' + canon_form + self.separator
+ + ('' if intro.startswith ('copyright = ') else ' ')
+ + canon_form + self.separator
+ line[match.end (2):])
# Use the standard (C) form.