| OLD | NEW |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 # This file is meant to be included into a target to provide a rule | 5 # This file is meant to be included into a target to provide a rule |
| 6 # to generate Java source files from templates that are processed | 6 # to generate Java source files from templates that are processed |
| 7 # through the host C pre-processor. | 7 # through the host C pre-processor. |
| 8 # | 8 # |
| 9 # NOTE: For generating Java conterparts to enums prefer using the java_cpp_enum | 9 # NOTE: For generating Java conterparts to enums prefer using the java_cpp_enum |
| 10 # rule instead. | 10 # rule instead. |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 # itself should use the 'ClassName.template' format, and will generate | 27 # itself should use the 'ClassName.template' format, and will generate |
| 28 # 'gen/templates/<target-name>/<package-name>/ClassName.java. The files which | 28 # 'gen/templates/<target-name>/<package-name>/ClassName.java. The files which |
| 29 # template dependents on and typically included by the template should be listed | 29 # template dependents on and typically included by the template should be listed |
| 30 # in template_deps variables. Any change to them will force a rebuild of | 30 # in template_deps variables. Any change to them will force a rebuild of |
| 31 # the template, and hence of any source that depends on it. | 31 # the template, and hence of any source that depends on it. |
| 32 # | 32 # |
| 33 | 33 |
| 34 { | 34 { |
| 35 # Location where all generated Java sources will be placed. | 35 # Location where all generated Java sources will be placed. |
| 36 'variables': { | 36 'variables': { |
| 37 'additional_gcc_preprocess_options': [], |
| 37 'include_path%': '<(DEPTH)', | 38 'include_path%': '<(DEPTH)', |
| 38 'output_dir': '<(SHARED_INTERMEDIATE_DIR)/templates/<(_target_name)/<(packag
e_name)', | 39 'output_dir': '<(SHARED_INTERMEDIATE_DIR)/templates/<(_target_name)/<(packag
e_name)', |
| 39 }, | 40 }, |
| 40 'direct_dependent_settings': { | 41 'direct_dependent_settings': { |
| 41 'variables': { | 42 'variables': { |
| 42 # Ensure that the output directory is used in the class path | 43 # Ensure that the output directory is used in the class path |
| 43 # when building targets that depend on this one. | 44 # when building targets that depend on this one. |
| 44 'generated_src_dirs': [ | 45 'generated_src_dirs': [ |
| 45 '<(output_dir)/', | 46 '<(output_dir)/', |
| 46 ], | 47 ], |
| (...skipping 20 matching lines...) Expand all Loading... |
| 67 '<@(template_deps)' | 68 '<@(template_deps)' |
| 68 ], | 69 ], |
| 69 'outputs': [ | 70 'outputs': [ |
| 70 '<(output_path)', | 71 '<(output_path)', |
| 71 ], | 72 ], |
| 72 'action': [ | 73 'action': [ |
| 73 'python', '<(DEPTH)/build/android/gyp/gcc_preprocess.py', | 74 'python', '<(DEPTH)/build/android/gyp/gcc_preprocess.py', |
| 74 '--include-path=<(include_path)', | 75 '--include-path=<(include_path)', |
| 75 '--output=<(output_path)', | 76 '--output=<(output_path)', |
| 76 '--template=<(RULE_INPUT_PATH)', | 77 '--template=<(RULE_INPUT_PATH)', |
| 78 '<@(additional_gcc_preprocess_options)', |
| 77 ], | 79 ], |
| 78 'message': 'Generating Java from cpp template <(RULE_INPUT_PATH)', | 80 'message': 'Generating Java from cpp template <(RULE_INPUT_PATH)', |
| 79 } | 81 } |
| 80 ], | 82 ], |
| 81 } | 83 } |
| OLD | NEW |