Chromium Code Reviews| Index: gn/echo_headers.py |
| diff --git a/gn/echo_headers.py b/gn/echo_headers.py |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..8beb87fd6d8b4ebb423ea931cc333cd04cb67f1b |
| --- /dev/null |
| +++ b/gn/echo_headers.py |
| @@ -0,0 +1,32 @@ |
| +#!/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 = [ |
| + 'SkJSONCPP.h', |
| + 'GrGLConfig_chrome.h', |
| +] |
| + |
| +headers = [] |
| +for d in sys.argv[2:]: |
| + headers.extend([f for f in os.listdir(d) |
| + if os.path.isfile(os.path.join(d,f))]) |
| +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: |
| + skip = False |
|
hal.canary
2016/07/26 18:54:09
for h in headers:
if h in blacklist:
continu
mtklein
2016/07/26 18:55:41
Done.
|
| + for term in blacklist: |
| + if term in h: |
| + skip = True |
| + if not skip: |
| + f.write('#include "' + h + '"\n') |
| + f.write('#endif//skia_h_DEFINED\n') |