Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
michael@0 | 2 | # Use of this source code is governed by a BSD-style license that can be |
michael@0 | 3 | # found in the LICENSE file. |
michael@0 | 4 | |
michael@0 | 5 | # This file is meant to be included into a target to provide a rule |
michael@0 | 6 | # to generate jni bindings for Java-files in a consistent manner. |
michael@0 | 7 | # |
michael@0 | 8 | # To use this, create a gyp target with the following form: |
michael@0 | 9 | # { |
michael@0 | 10 | # 'target_name': 'base_jni_headers', |
michael@0 | 11 | # 'type': 'none', |
michael@0 | 12 | # 'sources': [ |
michael@0 | 13 | # 'android/java/src/org/chromium/base/BuildInfo.java', |
michael@0 | 14 | # ... |
michael@0 | 15 | # ... |
michael@0 | 16 | # 'android/java/src/org/chromium/base/SystemMessageHandler.java', |
michael@0 | 17 | # ], |
michael@0 | 18 | # 'variables': { |
michael@0 | 19 | # 'jni_gen_dir': 'base', |
michael@0 | 20 | # }, |
michael@0 | 21 | # 'includes': [ '../build/jni_generator.gypi' ], |
michael@0 | 22 | # }, |
michael@0 | 23 | # |
michael@0 | 24 | # The generated file name pattern can be seen on the "outputs" section below. |
michael@0 | 25 | # (note that RULE_INPUT_ROOT is the basename for the java file). |
michael@0 | 26 | # |
michael@0 | 27 | # See base/android/jni_generator/jni_generator.py for more info about the |
michael@0 | 28 | # format of generating JNI bindings. |
michael@0 | 29 | |
michael@0 | 30 | { |
michael@0 | 31 | 'variables': { |
michael@0 | 32 | 'jni_generator': '<(DEPTH)/base/android/jni_generator/jni_generator.py', |
michael@0 | 33 | }, |
michael@0 | 34 | 'rules': [ |
michael@0 | 35 | { |
michael@0 | 36 | 'rule_name': 'generate_jni_headers', |
michael@0 | 37 | 'extension': 'java', |
michael@0 | 38 | 'inputs': [ |
michael@0 | 39 | '<(jni_generator)', |
michael@0 | 40 | ], |
michael@0 | 41 | 'outputs': [ |
michael@0 | 42 | '<(SHARED_INTERMEDIATE_DIR)/<(jni_gen_dir)/jni/<(RULE_INPUT_ROOT)_jni.h', |
michael@0 | 43 | ], |
michael@0 | 44 | 'action': [ |
michael@0 | 45 | '<(jni_generator)', |
michael@0 | 46 | '--input_file', |
michael@0 | 47 | '<(RULE_INPUT_PATH)', |
michael@0 | 48 | '--output_dir', |
michael@0 | 49 | '<(SHARED_INTERMEDIATE_DIR)/<(jni_gen_dir)/jni', |
michael@0 | 50 | ], |
michael@0 | 51 | 'message': 'Generating JNI bindings from <(RULE_INPUT_PATH)', |
michael@0 | 52 | 'process_outputs_as_sources': 1, |
michael@0 | 53 | }, |
michael@0 | 54 | ], |
michael@0 | 55 | # This target exports a hard dependency because it generates header |
michael@0 | 56 | # files. |
michael@0 | 57 | 'hard_dependency': 1, |
michael@0 | 58 | } |