1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/media/webrtc/trunk/build/java_aidl.gypi Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,58 @@ 1.4 +# Copyright (c) 2012 The Chromium Authors. All rights reserved. 1.5 +# Use of this source code is governed by a BSD-style license that can be 1.6 +# found in the LICENSE file. 1.7 + 1.8 +# This file is meant to be included into a target to provide a rule 1.9 +# to build Java aidl files in a consistent manner. 1.10 +# 1.11 +# To use this, create a gyp target with the following form: 1.12 +# { 1.13 +# 'target_name': 'aidl_aidl-file-name', 1.14 +# 'type': 'none', 1.15 +# 'variables': { 1.16 +# 'package_name': <name-of-package> 1.17 +# 'aidl_interface_file': '<interface-path>/<interface-file>.aidl', 1.18 +# }, 1.19 +# 'sources': { 1.20 +# '<input-path1>/<input-file1>.aidl', 1.21 +# '<input-path2>/<input-file2>.aidl', 1.22 +# ... 1.23 +# }, 1.24 +# 'includes': ['<path-to-this-file>/java_aidl.gypi'], 1.25 +# } 1.26 +# 1.27 +# 1.28 +# The generated java files will be: 1.29 +# <(PRODUCT_DIR)/lib.java/<input-file1>.java 1.30 +# <(PRODUCT_DIR)/lib.java/<input-file2>.java 1.31 +# ... 1.32 +# 1.33 +# TODO(cjhopman): dependents need to rebuild when this target's inputs have changed. 1.34 + 1.35 +{ 1.36 + 'direct_dependent_settings': { 1.37 + 'variables': { 1.38 + 'generated_src_dirs': ['<(SHARED_INTERMEDIATE_DIR)/<(package_name)/aidl/'], 1.39 + }, 1.40 + }, 1.41 + 'rules': [ 1.42 + { 1.43 + 'rule_name': 'compile_aidl', 1.44 + 'extension': 'aidl', 1.45 + 'inputs': [ 1.46 + '<(android_sdk)/framework.aidl', 1.47 + '<(aidl_interface_file)', 1.48 + ], 1.49 + 'outputs': [ 1.50 + '<(SHARED_INTERMEDIATE_DIR)/<(package_name)/aidl/<(RULE_INPUT_ROOT).java', 1.51 + ], 1.52 + 'action': [ 1.53 + '<(android_sdk_tools)/aidl', 1.54 + '-p<(android_sdk)/framework.aidl', 1.55 + '-p<(aidl_interface_file)', 1.56 + '<(RULE_INPUT_PATH)', 1.57 + '<(SHARED_INTERMEDIATE_DIR)/<(package_name)/aidl/<(RULE_INPUT_ROOT).java', 1.58 + ], 1.59 + }, 1.60 + ], 1.61 +}