| 125 | |
| 126 | |
| 127 | def 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 | |
| 143 | def generate_gni(header_files): |