Bug 1564761 [wpt PR 17620] - Document::CheckComplete should be nop when called from...
[gecko.git] / config / make-stl-wrappers.py
blob803b15fc1a8fc73f13de17574690275d75952100
1 # This Source Code Form is subject to the terms of the Mozilla Public
2 # License, v. 2.0. If a copy of the MPL was not distributed with this
3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 from __future__ import absolute_import
5 from __future__ import print_function
6 import os
7 import string
8 from mozbuild.util import FileAvoidWrite
9 from system_header_util import header_path
12 # The 'unused' arg is the output file from the file_generate action. We actually
13 # generate all the files in header_list
16 def gen_wrappers(unused, outdir, compiler, template_file, *header_list):
17 template = open(template_file, 'r').read()
19 for header in header_list:
20 path = header_path(header, compiler)
21 with FileAvoidWrite(os.path.join(outdir, header)) as f:
22 f.write(string.Template(template).substitute(HEADER=header,
23 HEADER_PATH=path))