Imported Upstream version 2.6.7
[platform/upstream/harfbuzz.git] / src / gen-harfbuzzcc.py
1 #!/usr/bin/env python3
2
3 "usage: gen-harfbuzzcc.py harfbuzz.cc hb-blob.cc hb-buffer.cc ..."
4
5 import os, re, sys
6
7 os.chdir (os.path.dirname (__file__))
8
9 if len (sys.argv) < 3:
10         sys.exit (__doc__)
11
12 output_file = sys.argv[1]
13 source_paths = sys.argv[2:]
14
15 with open (output_file, "wb") as f:
16         f.write ("".join ('#include "{}"\n'.format (x)
17                                           for x in source_paths
18                                           if x.endswith (".cc")).encode ())