MCPcopy Create free account
hub / github.com/nodejs/node / create_including_cc_files

Function create_including_cc_files

deps/v8/tools/generate-header-include-checks.py:127–140  ·  view source on GitHub ↗
(header_files)

Source from the content-addressed store, hash-verified

125
126
127def create_including_cc_files(header_files):
128 comment = 'check including this header in isolation'
129 for header in header_files:
130 cc_file_name = get_cc_file_name(header)
131 rel_cc_file_name = os.path.relpath(cc_file_name, V8_DIR)
132 content = '#include "{}" // {}\n'.format(header, comment)
133 if os.path.exists(cc_file_name):
134 with open(cc_file_name) as cc_file:
135 if cc_file.read() == content:
136 printv('File {} is up to date'.format(rel_cc_file_name))
137 continue
138 printv('Creating file {}'.format(rel_cc_file_name))
139 with open(cc_file_name, 'w') as cc_file:
140 cc_file.write(content)
141
142
143def generate_gni(header_files):

Callers 1

mainFunction · 0.85

Calls 7

get_cc_file_nameFunction · 0.85
printvFunction · 0.85
formatMethod · 0.65
openFunction · 0.50
existsMethod · 0.45
readMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected