Commit 309bd3b6 by Jamie Madill Committed by Commit Bot

Use hard-coded year in generate_entry_points.

Using a dynamic year isn't fully supported as it makes the auto- generation depend on the date. Also we do not need to update the year in the copyright notices for any files in ANGLE. Bug: angleproject:2621 Change-Id: I123864e77bffe8e04e5b299f0c58853c89287372 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2552980 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarCody Northrop <cnorthrop@google.com> Reviewed-by: 's avatarCourtney Goeltzenleuchter <courtneygo@google.com>
parent cfe14e28
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
"scripts/entry_point_packed_gl_enums.json": "scripts/entry_point_packed_gl_enums.json":
"846be5dc8cb36076207699b025633fcc", "846be5dc8cb36076207699b025633fcc",
"scripts/generate_entry_points.py": "scripts/generate_entry_points.py":
"f5a30660ec14edeff98a21a1038b02a7", "8cac2161436060a0ba9c55696aba2069",
"scripts/gl.xml": "scripts/gl.xml":
"f66967f3f3d696b5d8306fd80bbd49a8", "f66967f3f3d696b5d8306fd80bbd49a8",
"scripts/gl_angle_ext.xml": "scripts/gl_angle_ext.xml":
......
...@@ -43,7 +43,7 @@ strip_suffixes = ["ANGLE", "EXT", "KHR", "OES", "CHROMIUM", "OVR"] ...@@ -43,7 +43,7 @@ strip_suffixes = ["ANGLE", "EXT", "KHR", "OES", "CHROMIUM", "OVR"]
template_entry_point_header = """// GENERATED FILE - DO NOT EDIT. template_entry_point_header = """// GENERATED FILE - DO NOT EDIT.
// Generated by {script_name} using data from {data_source_name}. // Generated by {script_name} using data from {data_source_name}.
// //
// Copyright {year} The ANGLE Project Authors. All rights reserved. // Copyright 2020 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// //
...@@ -66,7 +66,7 @@ namespace gl ...@@ -66,7 +66,7 @@ namespace gl
template_entry_point_source = """// GENERATED FILE - DO NOT EDIT. template_entry_point_source = """// GENERATED FILE - DO NOT EDIT.
// Generated by {script_name} using data from {data_source_name}. // Generated by {script_name} using data from {data_source_name}.
// //
// Copyright {year} The ANGLE Project Authors. All rights reserved. // Copyright 2020 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// //
...@@ -83,7 +83,7 @@ namespace gl ...@@ -83,7 +83,7 @@ namespace gl
template_entry_points_enum_header = """// GENERATED FILE - DO NOT EDIT. template_entry_points_enum_header = """// GENERATED FILE - DO NOT EDIT.
// Generated by {script_name} using data from {data_source_name}. // Generated by {script_name} using data from {data_source_name}.
// //
// Copyright {year} The ANGLE Project Authors. All rights reserved. // Copyright 2020 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// //
...@@ -111,7 +111,7 @@ template_entry_points_name_case = """ case EntryPoint::{enum}: ...@@ -111,7 +111,7 @@ template_entry_points_name_case = """ case EntryPoint::{enum}:
template_entry_points_enum_source = """// GENERATED FILE - DO NOT EDIT. template_entry_points_enum_source = """// GENERATED FILE - DO NOT EDIT.
// Generated by {script_name} using data from {data_source_name}. // Generated by {script_name} using data from {data_source_name}.
// //
// Copyright {year} The ANGLE Project Authors. All rights reserved. // Copyright 2020 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// //
...@@ -140,7 +140,7 @@ const char *GetEntryPointName(EntryPoint ep) ...@@ -140,7 +140,7 @@ const char *GetEntryPointName(EntryPoint ep)
template_lib_entry_point_source = """// GENERATED FILE - DO NOT EDIT. template_lib_entry_point_source = """// GENERATED FILE - DO NOT EDIT.
// Generated by {script_name} using data from {data_source_name}. // Generated by {script_name} using data from {data_source_name}.
// //
// Copyright {year} The ANGLE Project Authors. All rights reserved. // Copyright 2020 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// //
...@@ -208,7 +208,7 @@ template_entry_point_with_return = """{return_type}GL_APIENTRY {name}{explicit_c ...@@ -208,7 +208,7 @@ template_entry_point_with_return = """{return_type}GL_APIENTRY {name}{explicit_c
context_header = """// GENERATED FILE - DO NOT EDIT. context_header = """// GENERATED FILE - DO NOT EDIT.
// Generated by {script_name} using data from {data_source_name}. // Generated by {script_name} using data from {data_source_name}.
// //
// Copyright {year} The ANGLE Project Authors. All rights reserved. // Copyright 2020 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// //
...@@ -234,7 +234,7 @@ libgles_entry_point_def = """{return_type}GL_APIENTRY gl{name}{explicit_context_ ...@@ -234,7 +234,7 @@ libgles_entry_point_def = """{return_type}GL_APIENTRY gl{name}{explicit_context_
template_glext_explicit_context_inc = """// GENERATED FILE - DO NOT EDIT. template_glext_explicit_context_inc = """// GENERATED FILE - DO NOT EDIT.
// Generated by {script_name} using data from {data_source_name}. // Generated by {script_name} using data from {data_source_name}.
// //
// Copyright {year} The ANGLE Project Authors. All rights reserved. // Copyright 2020 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// //
...@@ -253,7 +253,7 @@ template_glext_function_prototype = """{apicall} {return_type}GL_APIENTRY {name} ...@@ -253,7 +253,7 @@ template_glext_function_prototype = """{apicall} {return_type}GL_APIENTRY {name}
template_validation_header = """// GENERATED FILE - DO NOT EDIT. template_validation_header = """// GENERATED FILE - DO NOT EDIT.
// Generated by {script_name} using data from {data_source_name}. // Generated by {script_name} using data from {data_source_name}.
// //
// Copyright {year} The ANGLE Project Authors. All rights reserved. // Copyright 2020 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// //
...@@ -278,7 +278,7 @@ class Context; ...@@ -278,7 +278,7 @@ class Context;
template_capture_header = """// GENERATED FILE - DO NOT EDIT. template_capture_header = """// GENERATED FILE - DO NOT EDIT.
// Generated by {script_name} using data from {data_source_name}. // Generated by {script_name} using data from {data_source_name}.
// //
// Copyright {year} The ANGLE Project Authors. All rights reserved. // Copyright 2020 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// //
...@@ -302,7 +302,7 @@ namespace gl ...@@ -302,7 +302,7 @@ namespace gl
template_capture_source = """// GENERATED FILE - DO NOT EDIT. template_capture_source = """// GENERATED FILE - DO NOT EDIT.
// Generated by {script_name} using data from {data_source_name}. // Generated by {script_name} using data from {data_source_name}.
// //
// Copyright {year} The ANGLE Project Authors. All rights reserved. // Copyright 2020 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// //
...@@ -375,7 +375,7 @@ template_parameter_capture_pointer_func = """void {name}({params});""" ...@@ -375,7 +375,7 @@ template_parameter_capture_pointer_func = """void {name}({params});"""
template_capture_replay_source = """// GENERATED FILE - DO NOT EDIT. template_capture_replay_source = """// GENERATED FILE - DO NOT EDIT.
// Generated by {script_name} using data from {data_source_name}. // Generated by {script_name} using data from {data_source_name}.
// //
// Copyright {year} The ANGLE Project Authors. All rights reserved. // Copyright 2020 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// //
...@@ -514,7 +514,7 @@ template_validation_proto = "bool Validate%s(%s);" ...@@ -514,7 +514,7 @@ template_validation_proto = "bool Validate%s(%s);"
template_windows_def_file = """; GENERATED FILE - DO NOT EDIT. template_windows_def_file = """; GENERATED FILE - DO NOT EDIT.
; Generated by {script_name} using data from {data_source_name}. ; Generated by {script_name} using data from {data_source_name}.
; ;
; Copyright {year} The ANGLE Project Authors. All rights reserved. ; Copyright 2020 The ANGLE Project Authors. All rights reserved.
; Use of this source code is governed by a BSD-style license that can be ; Use of this source code is governed by a BSD-style license that can be
; found in the LICENSE file. ; found in the LICENSE file.
LIBRARY {lib} LIBRARY {lib}
...@@ -525,7 +525,7 @@ EXPORTS ...@@ -525,7 +525,7 @@ EXPORTS
template_frame_capture_utils_header = """// GENERATED FILE - DO NOT EDIT. template_frame_capture_utils_header = """// GENERATED FILE - DO NOT EDIT.
// Generated by {script_name} using data from {data_source_name}. // Generated by {script_name} using data from {data_source_name}.
// //
// Copyright {year} The ANGLE Project Authors. All rights reserved. // Copyright 2020 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// //
...@@ -613,7 +613,7 @@ const char *GetResourceIDTypeName(ResourceIDType resourceIDType); ...@@ -613,7 +613,7 @@ const char *GetResourceIDTypeName(ResourceIDType resourceIDType);
template_frame_capture_utils_source = """// GENERATED FILE - DO NOT EDIT. template_frame_capture_utils_source = """// GENERATED FILE - DO NOT EDIT.
// Generated by {script_name} using data from {data_source_name}. // Generated by {script_name} using data from {data_source_name}.
// //
// Copyright {year} The ANGLE Project Authors. All rights reserved. // Copyright 2020 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// //
...@@ -1209,7 +1209,6 @@ def write_file(annotation, comment, template, entry_points, suffix, includes, li ...@@ -1209,7 +1209,6 @@ def write_file(annotation, comment, template, entry_points, suffix, includes, li
content = template.format( content = template.format(
script_name=os.path.basename(sys.argv[0]), script_name=os.path.basename(sys.argv[0]),
data_source_name=file, data_source_name=file,
year=date.today().year,
annotation_lower=annotation.lower(), annotation_lower=annotation.lower(),
annotation_upper=annotation.upper(), annotation_upper=annotation.upper(),
comment=comment, comment=comment,
...@@ -1228,7 +1227,6 @@ def write_export_files(entry_points, includes, source, lib_name, lib_description ...@@ -1228,7 +1227,6 @@ def write_export_files(entry_points, includes, source, lib_name, lib_description
content = template_lib_entry_point_source.format( content = template_lib_entry_point_source.format(
script_name=os.path.basename(sys.argv[0]), script_name=os.path.basename(sys.argv[0]),
data_source_name=source, data_source_name=source,
year=date.today().year,
lib_name=lib_name, lib_name=lib_name,
lib_description=lib_description, lib_description=lib_description,
includes=includes, includes=includes,
...@@ -1256,7 +1254,6 @@ def write_context_api_decls(template, decls, api): ...@@ -1256,7 +1254,6 @@ def write_context_api_decls(template, decls, api):
annotation_upper=annotation.upper(), annotation_upper=annotation.upper(),
script_name=os.path.basename(sys.argv[0]), script_name=os.path.basename(sys.argv[0]),
data_source_name="gl.xml", data_source_name="gl.xml",
year=date.today().year,
version=version, version=version,
interface="\n".join(interface_lines)) interface="\n".join(interface_lines))
...@@ -1280,7 +1277,6 @@ def write_context_api_decls(template, decls, api): ...@@ -1280,7 +1277,6 @@ def write_context_api_decls(template, decls, api):
annotation_upper='GLES_EXT', annotation_upper='GLES_EXT',
script_name=os.path.basename(sys.argv[0]), script_name=os.path.basename(sys.argv[0]),
data_source_name="gl.xml", data_source_name="gl.xml",
year=date.today().year,
version='EXT', version='EXT',
interface="\n".join(interface_lines)) interface="\n".join(interface_lines))
...@@ -1298,7 +1294,6 @@ def write_glext_explicit_context_inc(version, ptrs, protos): ...@@ -1298,7 +1294,6 @@ def write_glext_explicit_context_inc(version, ptrs, protos):
content = template_glext_explicit_context_inc.format( content = template_glext_explicit_context_inc.format(
script_name=os.path.basename(sys.argv[0]), script_name=os.path.basename(sys.argv[0]),
data_source_name="gl.xml and gl_angle_ext.xml", data_source_name="gl.xml and gl_angle_ext.xml",
year=date.today().year,
version=version, version=version,
function_pointers=ptrs, function_pointers=ptrs,
function_prototypes=protos) function_prototypes=protos)
...@@ -1316,7 +1311,6 @@ def write_validation_header(annotation, comment, protos, source): ...@@ -1316,7 +1311,6 @@ def write_validation_header(annotation, comment, protos, source):
content = template_validation_header.format( content = template_validation_header.format(
script_name=os.path.basename(sys.argv[0]), script_name=os.path.basename(sys.argv[0]),
data_source_name=source, data_source_name=source,
year=date.today().year,
annotation=annotation, annotation=annotation,
comment=comment, comment=comment,
prototypes="\n".join(protos)) prototypes="\n".join(protos))
...@@ -1332,7 +1326,6 @@ def write_capture_header(annotation, comment, protos, capture_pointer_funcs): ...@@ -1332,7 +1326,6 @@ def write_capture_header(annotation, comment, protos, capture_pointer_funcs):
content = template_capture_header.format( content = template_capture_header.format(
script_name=os.path.basename(sys.argv[0]), script_name=os.path.basename(sys.argv[0]),
data_source_name="gl.xml and gl_angle_ext.xml", data_source_name="gl.xml and gl_angle_ext.xml",
year=date.today().year,
annotation=annotation, annotation=annotation,
comment=comment, comment=comment,
prototypes="\n".join(["\n// Method Captures\n"] + protos + ["\n// Parameter Captures\n"] + prototypes="\n".join(["\n// Method Captures\n"] + protos + ["\n// Parameter Captures\n"] +
...@@ -1349,7 +1342,6 @@ def write_capture_source(annotation_with_dash, annotation_no_dash, comment, capt ...@@ -1349,7 +1342,6 @@ def write_capture_source(annotation_with_dash, annotation_no_dash, comment, capt
content = template_capture_source.format( content = template_capture_source.format(
script_name=os.path.basename(sys.argv[0]), script_name=os.path.basename(sys.argv[0]),
data_source_name="gl.xml and gl_angle_ext.xml", data_source_name="gl.xml and gl_angle_ext.xml",
year=date.today().year,
annotation_with_dash=annotation_with_dash, annotation_with_dash=annotation_with_dash,
annotation_no_dash=annotation_no_dash, annotation_no_dash=annotation_no_dash,
comment=comment, comment=comment,
...@@ -1468,7 +1460,6 @@ def write_capture_helper_header(all_param_types): ...@@ -1468,7 +1460,6 @@ def write_capture_helper_header(all_param_types):
content = template_frame_capture_utils_header.format( content = template_frame_capture_utils_header.format(
script_name=os.path.basename(sys.argv[0]), script_name=os.path.basename(sys.argv[0]),
data_source_name="gl.xml and gl_angle_ext.xml", data_source_name="gl.xml and gl_angle_ext.xml",
year=date.today().year,
param_types=param_types, param_types=param_types,
param_type_count=len(all_param_types), param_type_count=len(all_param_types),
param_union_values=param_union_values, param_union_values=param_union_values,
...@@ -1530,7 +1521,6 @@ def write_capture_helper_source(all_param_types): ...@@ -1530,7 +1521,6 @@ def write_capture_helper_source(all_param_types):
content = template_frame_capture_utils_source.format( content = template_frame_capture_utils_source.format(
script_name=os.path.basename(sys.argv[0]), script_name=os.path.basename(sys.argv[0]),
data_source_name="gl.xml and gl_angle_ext.xml", data_source_name="gl.xml and gl_angle_ext.xml",
year=date.today().year,
write_param_type_to_stream_cases=write_param_type_to_stream_cases, write_param_type_to_stream_cases=write_param_type_to_stream_cases,
param_type_to_string_cases=param_type_to_string_cases, param_type_to_string_cases=param_type_to_string_cases,
param_type_resource_id_cases=param_type_resource_id_cases, param_type_resource_id_cases=param_type_resource_id_cases,
...@@ -1619,7 +1609,6 @@ def write_capture_replay_source(all_commands_nodes, gles_command_names, cmd_pack ...@@ -1619,7 +1609,6 @@ def write_capture_replay_source(all_commands_nodes, gles_command_names, cmd_pack
source_content = template_capture_replay_source.format( source_content = template_capture_replay_source.format(
script_name=os.path.basename(sys.argv[0]), script_name=os.path.basename(sys.argv[0]),
data_source_name="gl.xml and gl_angle_ext.xml", data_source_name="gl.xml and gl_angle_ext.xml",
year=date.today().year,
call_replay_cases=call_replay_cases, call_replay_cases=call_replay_cases,
) )
source_file_path = registry_xml.script_relative( source_file_path = registry_xml.script_relative(
...@@ -1634,7 +1623,6 @@ def write_windows_def_file(data_source_name, lib, libexport, folder, exports): ...@@ -1634,7 +1623,6 @@ def write_windows_def_file(data_source_name, lib, libexport, folder, exports):
script_name=os.path.basename(sys.argv[0]), script_name=os.path.basename(sys.argv[0]),
data_source_name=data_source_name, data_source_name=data_source_name,
exports="\n".join(exports), exports="\n".join(exports),
year=date.today().year,
lib=libexport) lib=libexport)
path = path_to(folder, "%s_autogen.def" % lib) path = path_to(folder, "%s_autogen.def" % lib)
...@@ -2181,7 +2169,6 @@ def main(): ...@@ -2181,7 +2169,6 @@ def main():
entry_points_enum_header = template_entry_points_enum_header.format( entry_points_enum_header = template_entry_points_enum_header.format(
script_name=os.path.basename(sys.argv[0]), script_name=os.path.basename(sys.argv[0]),
data_source_name="gl.xml and gl_angle_ext.xml", data_source_name="gl.xml and gl_angle_ext.xml",
year=date.today().year,
lib="GL/GLES", lib="GL/GLES",
entry_points_list=",\n".join([" " + cmd for cmd in sorted_cmd_names])) entry_points_list=",\n".join([" " + cmd for cmd in sorted_cmd_names]))
...@@ -2196,7 +2183,6 @@ def main(): ...@@ -2196,7 +2183,6 @@ def main():
entry_points_enum_source = template_entry_points_enum_source.format( entry_points_enum_source = template_entry_points_enum_source.format(
script_name=os.path.basename(sys.argv[0]), script_name=os.path.basename(sys.argv[0]),
data_source_name="gl.xml and gl_angle_ext.xml", data_source_name="gl.xml and gl_angle_ext.xml",
year=date.today().year,
lib="GL/GLES", lib="GL/GLES",
entry_points_name_cases="\n".join(entry_points_cases)) entry_points_name_cases="\n".join(entry_points_cases))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment