mirror of
https://github.com/gcc-mirror/gcc.git
synced 2024-11-21 13:40:47 +00:00
libstdc++: Fix Python scripts to output the correct filename
These scripts both print "generated by $file, do not edit" header but one of them prints the wrong filename. Use the built-in __file__ attribute to ensure it's correct. contrib/ChangeLog: * unicode/gen_libstdcxx_unicode_data.py: Fix header of generated file to name the correct script. libstdc++-v3/ChangeLog: * include/bits/text_encoding-data.h: Regenerate. * include/bits/unicode-data.h: Regenerate. * scripts/gen_text_encoding_data.py: Fix header of generated file to name the correct script.
This commit is contained in:
parent
f5118546a8
commit
ef2efc53fd
@ -29,9 +29,11 @@
|
||||
import sys
|
||||
import re
|
||||
import math
|
||||
import os
|
||||
|
||||
print("""// Generated by contrib/unicode/gen_std_format_width.py, do not edit.
|
||||
|
||||
self = os.path.basename(__file__)
|
||||
print("// Generated by contrib/unicode/{}, do not edit.".format(self))
|
||||
print("""
|
||||
// Copyright The GNU Toolchain Authors.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
|
@ -1,4 +1,5 @@
|
||||
// Generated by gen_text_encoding_data.py, do not edit.
|
||||
// Generated by scripts/gen_text_encoding_data.py, do not edit.
|
||||
|
||||
|
||||
// Copyright The GNU Toolchain Authors.
|
||||
//
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Generated by contrib/unicode/gen_std_format_width.py, do not edit.
|
||||
// Generated by contrib/unicode/gen_libstdcxx_unicode_data.py, do not edit.
|
||||
|
||||
// Copyright The GNU Toolchain Authors.
|
||||
//
|
||||
|
@ -26,12 +26,15 @@
|
||||
|
||||
import sys
|
||||
import csv
|
||||
import os
|
||||
|
||||
if len(sys.argv) != 2:
|
||||
print("Usage: %s <character sets csv>" % sys.argv[0], file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
print("""// Generated by gen_text_encoding_data.py, do not edit.
|
||||
self = os.path.basename(__file__)
|
||||
print("// Generated by scripts/{}, do not edit.".format(self))
|
||||
print("""
|
||||
|
||||
// Copyright The GNU Toolchain Authors.
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user