harfbuzz/src/gen-harfbuzzcc.py

17 lines
365 B
Python
Raw Normal View History

#!/usr/bin/env python3
2020-05-28 12:31:15 +02:00
"usage: gen-harfbuzzcc.py harfbuzz.cc hb-blob.cc hb-buffer.cc ..."
import os, re, sys
if len (sys.argv) < 3:
2020-05-28 20:21:29 +02:00
sys.exit (__doc__)
output_file = sys.argv[1]
source_paths = sys.argv[2:]
with open (output_file, "wb") as f:
f.write ("".join ('#include "{}"\n'.format (x)
for x in source_paths
if x.endswith (".cc")).encode ())