1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
7 'mojom_bindings_generator_variables.gypi',
12 'java_out_dir': '<(PRODUCT_DIR)/java_mojo/<(_target_name)/src',
13 'stamp_filename': '<(PRODUCT_DIR)/java_mojo/<(_target_name)/<(_target_name).stamp',
15 'action_name': '<(_target_name)_mojom_bindings_stamp',
16 # The java output directory is deleted to ensure that the java library
17 # doesn't try to compile stale files.
19 'python', '<(DEPTH)/build/rmdir_and_stamp.py',
23 'inputs': [ '<@(_sources)' ],
24 'outputs': [ '<(stamp_filename)' ],
29 'rule_name': '<(_target_name)_mojom_bindings_generator',
32 'mojom_base_output_dir':
33 '<!(python <(DEPTH)/build/inverse_depth.py <(DEPTH))',
34 'java_out_dir': '<(PRODUCT_DIR)/java_mojo/<(_target_name)/src',
35 'mojom_import_args%': [
37 '-I<(DEPTH)/third_party/mojo/src'
39 'stamp_filename': '<(PRODUCT_DIR)/java_mojo/<(_target_name)/<(_target_name).stamp',
42 '<@(mojom_bindings_generator_sources)',
46 '<(SHARED_INTERMEDIATE_DIR)/<(mojom_base_output_dir)/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).mojom.cc',
47 '<(SHARED_INTERMEDIATE_DIR)/<(mojom_base_output_dir)/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).mojom.h',
48 '<(SHARED_INTERMEDIATE_DIR)/<(mojom_base_output_dir)/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).mojom.js',
49 '<(SHARED_INTERMEDIATE_DIR)/<(mojom_base_output_dir)/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT)_mojom.py',
50 '<(SHARED_INTERMEDIATE_DIR)/<(mojom_base_output_dir)/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).mojom-internal.h',
53 'python', '<@(mojom_bindings_generator)',
54 './<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).mojom',
55 '--use_bundled_pylibs',
57 '<@(mojom_import_args)',
58 '-o', '<(SHARED_INTERMEDIATE_DIR)',
59 '--java_output_directory=<(java_out_dir)',
60 '--dart_mojo_root=//third_party/mojo/src',
62 'message': 'Generating Mojo bindings from <(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).mojom',
63 'process_outputs_as_sources': 1,
67 '<(DEPTH)/third_party/mojo/mojo_public.gyp:mojo_interface_bindings_generation',
71 '<(DEPTH)/third_party/mojo/src',
72 '<(SHARED_INTERMEDIATE_DIR)',
73 '<(SHARED_INTERMEDIATE_DIR)/third_party/mojo/src',
75 'direct_dependent_settings': {
78 '<(DEPTH)/third_party/mojo/src',
79 '<(SHARED_INTERMEDIATE_DIR)',
80 '<(SHARED_INTERMEDIATE_DIR)/third_party/mojo/src',
83 'generated_src_dirs': [
84 '<(PRODUCT_DIR)/java_mojo/<(_target_name)/src',
86 'additional_input_paths': [
87 '<@(mojom_bindings_generator_sources)',