Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1531)

Side by Side Diff: gn/echo_headers.py

Issue 2202643002: GN: only include headers in echo_headers.py (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright 2016 Google Inc. 3 # Copyright 2016 Google Inc.
4 # 4 #
5 # Use of this source code is governed by a BSD-style license that can be 5 # Use of this source code is governed by a BSD-style license that can be
6 # found in the LICENSE file. 6 # found in the LICENSE file.
7 7
8 import sys 8 import sys
9 import os 9 import os
10 import os.path 10 import os.path
11 11
12 blacklist = [ 12 blacklist = [
13 'GrGLConfig_chrome.h', 13 'GrGLConfig_chrome.h',
14 'SkFontMgr_fontconfig.h', 14 'SkFontMgr_fontconfig.h',
15 ] 15 ]
16 16
17 headers = [] 17 headers = []
18 for d in sys.argv[2:]: 18 for d in sys.argv[2:]:
19 headers.extend([f for f in os.listdir(d) 19 headers.extend([f for f in os.listdir(d)
20 if os.path.isfile(os.path.join(d,f))]) 20 if os.path.isfile(os.path.join(d,f)) and f.endswith('.h')])
21 with open(sys.argv[1], "w") as f: 21 with open(sys.argv[1], "w") as f:
22 f.write('// skia.h generated by GN.\n') 22 f.write('// skia.h generated by GN.\n')
23 f.write('#ifndef skia_h_DEFINED\n') 23 f.write('#ifndef skia_h_DEFINED\n')
24 f.write('#define skia_h_DEFINED\n') 24 f.write('#define skia_h_DEFINED\n')
25 for h in headers: 25 for h in headers:
26 if h not in blacklist: 26 if h not in blacklist:
27 f.write('#include "' + h + '"\n') 27 f.write('#include "' + h + '"\n')
28 f.write('#endif//skia_h_DEFINED\n') 28 f.write('#endif//skia_h_DEFINED\n')
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698