aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2015-01-15 22:09:13 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2015-01-15 22:09:13 +0000
commit8fced9b97676f141d8334dda3319b6f7998c063d (patch)
tree212f21f666588618ab2812ecc7f40bd70dae3263 /contrib
parent1d59990631844e380a755124d122e308b8f01888 (diff)
downloadgcc-8fced9b97676f141d8334dda3319b6f7998c063d.zip
gcc-8fced9b97676f141d8334dda3319b6f7998c063d.tar.gz
gcc-8fced9b97676f141d8334dda3319b6f7998c063d.tar.bz2
update-copyright.py (Copyright.__init__): Add a regexp for "copyright = u'".
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. From-SVN: r219692
Diffstat (limited to 'contrib')
-rw-r--r--contrib/ChangeLog7
-rw-r--r--contrib/update-copyright.py4
2 files changed, 10 insertions, 1 deletions
diff --git a/contrib/ChangeLog b/contrib/ChangeLog
index f062ea9..b4ac7d9 100644
--- a/contrib/ChangeLog
+++ b/contrib/ChangeLog
@@ -1,3 +1,10 @@
+2015-01-15 Richard Sandiford <richard.sandiford@arm.com>
+
+ * 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.
+
2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
* gcc_update (files_and_dependencies): Update rules for new
diff --git a/contrib/update-copyright.py b/contrib/update-copyright.py
index 42d0bfb..f7b522a 100644
--- a/contrib/update-copyright.py
+++ b/contrib/update-copyright.py
@@ -183,6 +183,7 @@ class Copyright:
'|[Cc]opyright\s+%s'
'|[Cc]opyright\s+&copy;'
'|[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.