OLD | NEW |
---|---|
1 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 # for details. All rights reserved. Use of this source code is governed by a | 2 # for details. All rights reserved. Use of this source code is governed by a |
3 # BSD-style license that can be found in the LICENSE file. | 3 # BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 { | 5 { |
6 'variables' : { | 6 'variables' : { |
7 'script_suffix%': '', | 7 'script_suffix%': '', |
8 }, | 8 }, |
9 'conditions' : [ | 9 'conditions' : [ |
10 ['OS=="win"', { | 10 ['OS=="win"', { |
11 'variables' : { | 11 'variables' : { |
12 'script_suffix': '.bat', | 12 'script_suffix': '.bat', |
13 }, | 13 }, |
14 }], | 14 }], |
15 ], | 15 ], |
16 'targets': [ | 16 'targets': [ |
17 { | 17 { |
18 'target_name': 'api_docs', | 18 'target_name': 'docgen', |
19 'type': 'none', | 19 'type': 'none', |
20 'dependencies': [ | 20 'dependencies': [ |
21 '../../utils/compiler/compiler.gyp:dart2js', | 21 '../../utils/compiler/compiler.gyp:dart2js', |
22 '../../runtime/dart-runtime.gyp:dart', | 22 '../../runtime/dart-runtime.gyp:dart', |
23 '../../pkg/pkg.gyp:pkg_packages', | 23 '../../pkg/pkg.gyp:pkg_packages', |
24 ], | 24 ], |
25 'includes': [ | 25 'includes': [ |
26 '../../sdk/lib/core/corelib_sources.gypi', | 26 '../../sdk/lib/core/corelib_sources.gypi', |
27 ], | 27 ], |
28 'actions': [ | 28 'actions': [ |
29 { | 29 { |
30 'action_name': 'run_apidoc', | 30 'action_name': 'run_docgen', |
31 # The 'inputs' list records the files whose timestamps are | 31 # The 'inputs' list records the files whose timestamps are |
32 # compared to the files listed in 'outputs'. If a file | 32 # compared to the files listed in 'outputs'. If a file |
33 # 'outputs' doesn't exist or if a file in 'inputs' is newer | 33 # 'outputs' doesn't exist or if a file in 'inputs' is newer |
34 # than a file in 'outputs', this action is executed. Notice | 34 # than a file in 'outputs', this action is executed. Notice |
35 # that the dependencies listed above has nothing to do with | 35 # that the dependencies listed above has nothing to do with |
36 # when this action is executed. You must list a file in | 36 # when this action is executed. You must list a file in |
37 # 'inputs' to make sure that it exists before the action is | 37 # 'inputs' to make sure that it exists before the action is |
38 # executed, or to make sure this action is re-run. | 38 # executed, or to make sure this action is re-run. |
39 # | 39 # |
40 # We want to build the platform documentation whenever | 40 # We want to build the platform documentation whenever |
41 # dartdoc, apidoc, or its dependency changes. This prevents | 41 # dartdoc, apidoc, or its dependency changes. This prevents |
42 # people from accidentally breaking apidoc when making | 42 # people from accidentally breaking apidoc when making |
43 # changes to the platform libraries and or when modifying | 43 # changes to the platform libraries and or when modifying |
44 # dart2js or the VM. | 44 # dart2js or the VM. |
45 # | 45 # |
46 # In addition, we want to make sure that the platform | 46 # In addition, we want to make sure that the platform |
47 # documentation is regenerated when the platform sources | 47 # documentation is regenerated when the platform sources |
48 # changes. | 48 # changes. |
49 # | 49 # |
50 # So we want this action to be re-run when a dart file | 50 # So we want this action to be re-run when a dart file |
51 # changes in this directory, or in the SDK library (we may | 51 # changes in this directory, or in the SDK library (we may |
52 # no longer need to list the files in ../../runtime/lib and | 52 # no longer need to list the files in ../../runtime/lib and |
53 # ../../runtime/bin, as most of them has moved to | 53 # ../../runtime/bin, as most of them has moved to |
54 # ../../sdk/lib). | 54 # ../../sdk/lib). |
55 # | 55 # |
56 # In addition, we want to make sure the documentation is | |
57 # regenerated when a resource file (CSS, PNG, etc) is | |
58 # updated. This is because these files are also copied to | |
59 # the output directory. | |
60 'inputs': [ | 56 'inputs': [ |
61 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)dart<(EXECUTABLE_SUFFIX)', | 57 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)dart<(EXECUTABLE_SUFFIX)', |
62 '<(SHARED_INTERMEDIATE_DIR)/utils_wrapper.dart.snapshot', | 58 '<(SHARED_INTERMEDIATE_DIR)/utils_wrapper.dart.snapshot', |
63 '<!@(["python", "../../tools/list_files.py", "\\.(css|ico|js|json|pn g|sh|txt|yaml|py)$", ".", "../../sdk/lib/_internal/dartdoc"])', | 59 '<!@(["python", "../../tools/list_files.py", "\\.(css|ico|js|json|pn g|sh|txt|yaml|py)$", ".", "../../sdk/lib/_internal/dartdoc"])', |
64 '<!@(["python", "../../tools/list_files.py", "\\.dart$", ".", "../.. /sdk/lib", "../../runtime/lib", "../../runtime/bin"])', | 60 '<!@(["python", "../../tools/list_files.py", "\\.dart$", ".", "../.. /sdk/lib", "../../runtime/lib", "../../runtime/bin"])', |
65 '../../sdk/bin/dart', | 61 '../../sdk/bin/dart', |
66 '../../sdk/bin/dart.bat', | 62 '../../sdk/bin/dart.bat', |
67 '../../sdk/bin/dart2js', | 63 '../../sdk/bin/dart2js', |
68 '../../sdk/bin/dart2js.bat', | 64 '../../sdk/bin/dart2js.bat', |
69 '../../tools/only_in_release_mode.py', | 65 '../../tools/only_in_release_mode.py', |
70 ], | 66 ], |
71 'outputs': [ | 67 'outputs': [ |
72 '<(PRODUCT_DIR)/api_docs/index.html', | 68 '<(PRODUCT_DIR)/api_docs/docgen/library_list.json', |
ahe
2013/11/15 08:34:25
When is this file produced?
Are there other files
Alan Knight
2013/11/15 18:49:56
Good point. Changed it to use index.json, which is
ahe
2013/11/17 11:27:46
SGTM :-)
| |
73 '<(PRODUCT_DIR)/api_docs/client-static.js', | |
74 ], | 69 ], |
75 'action': [ | 70 'action': [ |
76 'python', | 71 'python', |
77 '../../tools/only_in_release_mode.py', | 72 '../../tools/only_in_release_mode.py', |
78 '<@(_outputs)', | 73 '<@(_outputs)', |
79 '--', | 74 '--', |
80 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)dart<(EXECUTABLE_SUFFIX)', | 75 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)dart<(EXECUTABLE_SUFFIX)', |
76 '--old_gen_heap_size=1024', | |
81 '--package-root=<(PRODUCT_DIR)/packages/', | 77 '--package-root=<(PRODUCT_DIR)/packages/', |
82 'apidoc.dart', | 78 '../../pkg/docgen/bin/docgen.dart', |
83 '--out=<(PRODUCT_DIR)/api_docs', | 79 '--out=<(PRODUCT_DIR)/api_docs/docgen', |
84 '--version=<!@(["python", "../../tools/print_version.py"])', | 80 '--json', |
81 '--include-sdk', | |
85 '--package-root=<(PRODUCT_DIR)/packages', | 82 '--package-root=<(PRODUCT_DIR)/packages', |
86 '--mode=static', | |
87 '--exclude-lib=analyzer', | |
88 '--exclude-lib=async_helper', | 83 '--exclude-lib=async_helper', |
89 '--exclude-lib=barback', | 84 '--exclude-lib=expect', |
90 '--exclude-lib=browser', | |
91 '--exclude-lib=dartdoc', | |
92 '--exclude-lib=docgen', | 85 '--exclude-lib=docgen', |
93 '--exclude-lib=expect', | 86 '../../pkg', |
94 '--exclude-lib=http', | |
95 '--exclude-lib=oauth2', | |
96 '--exclude-lib=scheduled_test', | |
97 '--exclude-lib=stack_trace', | |
98 '--exclude-lib=watcher', | |
99 '--exclude-lib=webdriver', | |
100 '--exclude-lib=yaml', | |
101 '--include-lib=matcher', | |
102 '--extra-lib=pkg/unittest/lib/mock.dart', | |
103 ], | 87 ], |
104 'message': 'Running apidoc: <(_action)', | 88 'message': 'Running docgen: <(_action)', |
105 }, | 89 }, |
106 ], | 90 ], |
107 } | 91 } |
108 ], | 92 ], |
109 } | 93 } |
OLD | NEW |