blob: 83938b3e2a1dfd1a5d7df5b74a8903bfddc0c8b3 [file] [log] [blame]
mtklein1211e0c2016-07-26 13:55:45 -07001#!/usr/bin/env python
2#
3# Copyright 2016 Google Inc.
4#
5# Use of this source code is governed by a BSD-style license that can be
6# found in the LICENSE file.
7
8import sys
9import os
10import os.path
11
12blacklist = [
13 'GrGLConfig_chrome.h',
mtklein7d10b9f2016-07-27 11:17:18 -070014 'SkFontMgr_fontconfig.h',
mtklein1211e0c2016-07-26 13:55:45 -070015]
16
17headers = []
18for d in sys.argv[2:]:
19 headers.extend([f for f in os.listdir(d)
mtklein6be452c2016-08-01 10:39:10 -070020 if os.path.isfile(os.path.join(d,f)) and f.endswith('.h')])
mtklein1211e0c2016-07-26 13:55:45 -070021with open(sys.argv[1], "w") as f:
22 f.write('// skia.h generated by GN.\n')
23 f.write('#ifndef skia_h_DEFINED\n')
24 f.write('#define skia_h_DEFINED\n')
25 for h in headers:
26 if h not in blacklist:
27 f.write('#include "' + h + '"\n')
28 f.write('#endif//skia_h_DEFINED\n')