OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2015 the V8 project authors. All rights reserved. | 2 # Copyright 2015 the V8 project authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """ | 6 """ |
7 Script to print potentially missing source dependencies based on the actual | 7 Script to print potentially missing source dependencies based on the actual |
8 .h and .cc files in the source tree and which files are included in the gyp | 8 .h and .cc files in the source tree and which files are included in the gyp |
9 and gn files. The latter inclusion is overapproximated. | 9 and gn files. The latter inclusion is overapproximated. |
10 | 10 |
11 TODO(machenbach): Gyp files in src will point to source files in src without a | 11 TODO(machenbach): Gyp files in src will point to source files in src without a |
12 src/ prefix. For simplicity, all paths relative to src are stripped. But this | 12 src/ prefix. For simplicity, all paths relative to src are stripped. But this |
13 tool won't be accurate for other sources in other directories (e.g. cctest). | 13 tool won't be accurate for other sources in other directories (e.g. cctest). |
14 """ | 14 """ |
15 | 15 |
16 import itertools | 16 import itertools |
17 import re | 17 import re |
18 import os | 18 import os |
19 | 19 |
20 | 20 |
21 V8_BASE = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) | 21 V8_BASE = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) |
22 V8_SRC_BASE = os.path.join(V8_BASE, 'src') | 22 V8_SRC_BASE = os.path.join(V8_BASE, 'src') |
23 V8_INCLUDE_BASE = os.path.join(V8_BASE, 'include') | 23 V8_INCLUDE_BASE = os.path.join(V8_BASE, 'include') |
24 | 24 |
25 GYP_FILES = [ | 25 GYP_FILES = [ |
26 os.path.join(V8_BASE, 'src', 'd8.gyp'), | 26 os.path.join(V8_BASE, 'src', 'd8.gyp'), |
| 27 os.path.join(V8_BASE, 'src', 'v8.gyp'), |
27 os.path.join(V8_BASE, 'src', 'third_party', 'vtune', 'v8vtune.gyp'), | 28 os.path.join(V8_BASE, 'src', 'third_party', 'vtune', 'v8vtune.gyp'), |
28 os.path.join(V8_BASE, 'test', 'cctest', 'cctest.gyp'), | 29 os.path.join(V8_BASE, 'test', 'cctest', 'cctest.gyp'), |
29 os.path.join(V8_BASE, 'test', 'unittests', 'unittests.gyp'), | 30 os.path.join(V8_BASE, 'test', 'unittests', 'unittests.gyp'), |
30 os.path.join(V8_BASE, 'tools', 'gyp', 'v8.gyp'), | |
31 os.path.join(V8_BASE, 'tools', 'parser-shell.gyp'), | 31 os.path.join(V8_BASE, 'tools', 'parser-shell.gyp'), |
32 ] | 32 ] |
33 | 33 |
34 | 34 |
35 def path_no_prefix(path): | 35 def path_no_prefix(path): |
36 if path.startswith('../'): | 36 if path.startswith('../'): |
37 return path_no_prefix(path[3:]) | 37 return path_no_prefix(path[3:]) |
38 elif path.startswith('src/'): | 38 elif path.startswith('src/'): |
39 return path_no_prefix(path[4:]) | 39 return path_no_prefix(path[4:]) |
40 else: | 40 else: |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 | 97 |
98 print "----------- Files not in gyp: ------------" | 98 print "----------- Files not in gyp: ------------" |
99 for i in sorted(icheck_values(gyp_values, V8_SRC_BASE, V8_INCLUDE_BASE)): | 99 for i in sorted(icheck_values(gyp_values, V8_SRC_BASE, V8_INCLUDE_BASE)): |
100 print i | 100 print i |
101 | 101 |
102 gn_values = set(iflatten_gn_file(os.path.join(V8_BASE, 'BUILD.gn'))) | 102 gn_values = set(iflatten_gn_file(os.path.join(V8_BASE, 'BUILD.gn'))) |
103 | 103 |
104 print "\n----------- Files not in gn: -------------" | 104 print "\n----------- Files not in gn: -------------" |
105 for i in sorted(icheck_values(gn_values, V8_SRC_BASE, V8_INCLUDE_BASE)): | 105 for i in sorted(icheck_values(gn_values, V8_SRC_BASE, V8_INCLUDE_BASE)): |
106 print i | 106 print i |
OLD | NEW |