2016-07-26 20:55:45 +00:00
|
|
|
#!/usr/bin/env python
|
|
|
|
#
|
|
|
|
# Copyright 2016 Google Inc.
|
|
|
|
#
|
|
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
|
|
# found in the LICENSE file.
|
|
|
|
|
|
|
|
import sys
|
|
|
|
import os
|
|
|
|
import os.path
|
|
|
|
|
|
|
|
blacklist = [
|
|
|
|
'GrGLConfig_chrome.h',
|
2016-07-27 18:17:18 +00:00
|
|
|
'SkFontMgr_fontconfig.h',
|
2016-07-26 20:55:45 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
headers = []
|
|
|
|
for d in sys.argv[2:]:
|
|
|
|
headers.extend([f for f in os.listdir(d)
|
2016-08-01 17:39:10 +00:00
|
|
|
if os.path.isfile(os.path.join(d,f)) and f.endswith('.h')])
|
2016-07-26 20:55:45 +00:00
|
|
|
with open(sys.argv[1], "w") as f:
|
|
|
|
f.write('// skia.h generated by GN.\n')
|
|
|
|
f.write('#ifndef skia_h_DEFINED\n')
|
|
|
|
f.write('#define skia_h_DEFINED\n')
|
|
|
|
for h in headers:
|
|
|
|
if h not in blacklist:
|
|
|
|
f.write('#include "' + h + '"\n')
|
|
|
|
f.write('#endif//skia_h_DEFINED\n')
|