Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(518)

Side by Side Diff: build/android/java_cpp_enum.gypi

Issue 934873002: Improve CLI interface of C++ enums to Java generator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments & rebased Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « build/android/gyp/java_cpp_enum_tests.py ('k') | build/config/android/rules.gni » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 an action 5 # This file is meant to be included into a target to provide an action
6 # to generate Java source files from a C++ header file containing annotated 6 # to generate Java source files from a C++ header file containing annotated
7 # enum definitions using a Python script. 7 # enum definitions using a Python script.
8 # 8 #
9 # To use this, create a gyp target with the following form: 9 # To use this, create a gyp target with the following form:
10 # { 10 # {
11 # 'target_name': 'bitmap_format_java', 11 # 'target_name': 'bitmap_format_java',
12 # 'type': 'none', 12 # 'type': 'none',
13 # 'variables': { 13 # 'variables': {
14 # 'source_file': 'ui/android/bitmap_format.h', 14 # 'source_file': 'ui/android/bitmap_format.h',
15 # }, 15 # },
16 # 'includes': [ '../build/android/java_cpp_enum.gypi' ], 16 # 'includes': [ '../build/android/java_cpp_enum.gypi' ],
17 # }, 17 # },
18 # 18 #
19 # Then have the gyp target which compiles the java code depend on the newly 19 # Then have the gyp target which compiles the java code depend on the newly
20 # created target. 20 # created target.
21 21
22 { 22 {
23 'variables': { 23 'variables': {
24 # Location where all generated Java sources will be placed. 24 # Location where all generated Java sources will be placed.
25 'output_dir': '<(SHARED_INTERMEDIATE_DIR)/enums/<(_target_name)', 25 'output_dir': '<(SHARED_INTERMEDIATE_DIR)/enums/<(_target_name)',
26 'generator_path': '<(DEPTH)/build/android/gyp/java_cpp_enum.py', 26 'generator_path': '<(DEPTH)/build/android/gyp/java_cpp_enum.py',
27 'generator_args': '--output_dir=<(output_dir) <(source_file)', 27 'generator_args': '<(output_dir) <(source_file)',
28 }, 28 },
29 'direct_dependent_settings': { 29 'direct_dependent_settings': {
30 'variables': { 30 'variables': {
31 # Ensure that the output directory is used in the class path 31 # Ensure that the output directory is used in the class path
32 # when building targets that depend on this one. 32 # when building targets that depend on this one.
33 'generated_src_dirs': [ 33 'generated_src_dirs': [
34 '<(output_dir)/', 34 '<(output_dir)/',
35 ], 35 ],
36 }, 36 },
37 }, 37 },
(...skipping 12 matching lines...) Expand all
50 '<!@pymod_do_main(java_cpp_enum --print_output_only ' 50 '<!@pymod_do_main(java_cpp_enum --print_output_only '
51 '<@(generator_args))', 51 '<@(generator_args))',
52 ], 52 ],
53 'action': [ 53 'action': [
54 'python', '<(generator_path)', '<@(generator_args)' 54 'python', '<(generator_path)', '<@(generator_args)'
55 ], 55 ],
56 'message': 'Generating Java from cpp header <(source_file)', 56 'message': 'Generating Java from cpp header <(source_file)',
57 }, 57 },
58 ], 58 ],
59 } 59 }
OLDNEW
« no previous file with comments | « build/android/gyp/java_cpp_enum_tests.py ('k') | build/config/android/rules.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698