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 'apidoc.gyp:api_docs', |
24 ], | 25 ], |
25 'includes': [ | 26 'includes': [ |
26 '../../sdk/lib/core/corelib_sources.gypi', | 27 '../../sdk/lib/core/corelib_sources.gypi', |
27 ], | 28 ], |
28 'actions': [ | 29 'actions': [ |
29 { | 30 { |
30 'action_name': 'run_apidoc', | 31 'action_name': 'run_docgen', |
31 # The 'inputs' list records the files whose timestamps are | 32 # The 'inputs' list records the files whose timestamps are |
32 # compared to the files listed in 'outputs'. If a file | 33 # compared to the files listed in 'outputs'. If a file |
33 # 'outputs' doesn't exist or if a file in 'inputs' is newer | 34 # 'outputs' doesn't exist or if a file in 'inputs' is newer |
34 # than a file in 'outputs', this action is executed. Notice | 35 # than a file in 'outputs', this action is executed. Notice |
35 # that the dependencies listed above has nothing to do with | 36 # that the dependencies listed above has nothing to do with |
36 # when this action is executed. You must list a file in | 37 # when this action is executed. You must list a file in |
37 # 'inputs' to make sure that it exists before the action is | 38 # 'inputs' to make sure that it exists before the action is |
38 # executed, or to make sure this action is re-run. | 39 # executed, or to make sure this action is re-run. |
39 # | 40 # |
40 # We want to build the platform documentation whenever | 41 # We want to build the platform documentation whenever |
41 # dartdoc, apidoc, or its dependency changes. This prevents | 42 # dartdoc, apidoc, or its dependency changes. This prevents |
42 # people from accidentally breaking apidoc when making | 43 # people from accidentally breaking apidoc when making |
43 # changes to the platform libraries and or when modifying | 44 # changes to the platform libraries and or when modifying |
44 # dart2js or the VM. | 45 # dart2js or the VM. |
45 # | 46 # |
46 # In addition, we want to make sure that the platform | 47 # In addition, we want to make sure that the platform |
47 # documentation is regenerated when the platform sources | 48 # documentation is regenerated when the platform sources |
48 # changes. | 49 # changes. |
49 # | 50 # |
50 # So we want this action to be re-run when a dart file | 51 # 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 | 52 # changes in this directory, or in the SDK library (we may |
52 # no longer need to list the files in ../../runtime/lib and | 53 # no longer need to list the files in ../../runtime/lib and |
53 # ../../runtime/bin, as most of them has moved to | 54 # ../../runtime/bin, as most of them has moved to |
54 # ../../sdk/lib). | 55 # ../../sdk/lib). |
55 # | 56 # |
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': [ | 57 'inputs': [ |
61 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)dart<(EXECUTABLE_SUFFIX)', | 58 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)dart<(EXECUTABLE_SUFFIX)', |
62 '<(SHARED_INTERMEDIATE_DIR)/utils_wrapper.dart.snapshot', | 59 '<(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"])', | 60 '<!@(["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"])', | 61 '<!@(["python", "../../tools/list_files.py", "\\.dart$", ".", "../..
/sdk/lib", "../../runtime/lib", "../../runtime/bin"])', |
65 '../../sdk/bin/dart', | 62 '../../sdk/bin/dart', |
66 '../../sdk/bin/dart.bat', | 63 '../../sdk/bin/dart.bat', |
67 '../../sdk/bin/dart2js', | 64 '../../sdk/bin/dart2js', |
68 '../../sdk/bin/dart2js.bat', | 65 '../../sdk/bin/dart2js.bat', |
69 '../../tools/only_in_release_mode.py', | 66 '../../tools/only_in_release_mode.py', |
| 67 # We sit inside the api_docs directory, so make sure it has run |
| 68 # before we do. Otherwise it might run later and delete us. |
| 69 '<(PRODUCT_DIR)/api_docs/index.html', |
70 ], | 70 ], |
71 'outputs': [ | 71 'outputs': [ |
72 '<(PRODUCT_DIR)/api_docs/index.html', | 72 '<(PRODUCT_DIR)/api_docs/docgen/index.json', |
73 '<(PRODUCT_DIR)/api_docs/client-static.js', | |
74 ], | 73 ], |
75 'action': [ | 74 'action': [ |
76 'python', | 75 'python', |
77 '../../tools/only_in_release_mode.py', | 76 '../../tools/only_in_release_mode.py', |
78 '<@(_outputs)', | 77 '<@(_outputs)', |
79 '--', | 78 '--', |
80 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)dart<(EXECUTABLE_SUFFIX)', | 79 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)dart<(EXECUTABLE_SUFFIX)', |
| 80 '--old_gen_heap_size=1024', |
81 '--package-root=<(PRODUCT_DIR)/packages/', | 81 '--package-root=<(PRODUCT_DIR)/packages/', |
82 'apidoc.dart', | 82 '../../pkg/docgen/bin/docgen.dart', |
83 '--out=<(PRODUCT_DIR)/api_docs', | 83 '--out=<(PRODUCT_DIR)/api_docs/docgen', |
84 '--version=<!@(["python", "../../tools/print_version.py"])', | 84 '--json', |
| 85 '--include-sdk', |
85 '--package-root=<(PRODUCT_DIR)/packages', | 86 '--package-root=<(PRODUCT_DIR)/packages', |
86 '--mode=static', | |
87 '--exclude-lib=analyzer', | |
88 '--exclude-lib=async_helper', | 87 '--exclude-lib=async_helper', |
89 '--exclude-lib=barback', | 88 '--exclude-lib=expect', |
90 '--exclude-lib=browser', | |
91 '--exclude-lib=dartdoc', | |
92 '--exclude-lib=docgen', | 89 '--exclude-lib=docgen', |
93 '--exclude-lib=expect', | 90 '../../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 ], | 91 ], |
104 'message': 'Running apidoc: <(_action)', | 92 'message': 'Running docgen: <(_action)', |
105 }, | 93 }, |
106 ], | 94 ], |
107 } | 95 } |
108 ], | 96 ], |
109 } | 97 } |
OLD | NEW |