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
3 # found in the LICENSE file.
5 # This file is meant to be included into a target to process one or more
8 # To process a single template file, create a gyp target with the following
11 # 'target_name': 'chrome_shell_manifest',
14 # 'jinja_inputs': ['android/shell/java/AndroidManifest.xml'],
15 # 'jinja_output': '<(SHARED_INTERMEDIATE_DIR)/chrome_shell_manifest/AndroidManifest.xml',
16 # 'jinja_variables': ['app_name=ChromeShell'],
18 # 'includes': [ '../build/android/jinja_template.gypi' ],
21 # To process multiple template files and package the results into a zip file,
22 # create a gyp target with the following form:
24 # 'target_name': 'chrome_template_resources',
27 # 'jinja_inputs_base_dir': 'android/shell/java/res_template',
29 # '<(jinja_inputs_base_dir)/xml/searchable.xml',
30 # '<(jinja_inputs_base_dir)/xml/syncadapter.xml',
32 # 'jinja_outputs_zip': '<(PRODUCT_DIR)/res.java/<(_target_name).zip',
33 # 'jinja_variables': ['app_name=ChromeShell'],
35 # 'includes': [ '../build/android/jinja_template.gypi' ],
42 'action_name': '<(_target_name)_jinja_template',
43 'message': 'processing jinja template',
46 'jinja_outputs_zip%': '',
47 'jinja_inputs_base_dir%': '',
48 'jinja_variables%': [],
52 '<(DEPTH)/build/android/gyp/util/build_utils.py',
53 '<(DEPTH)/build/android/gyp/jinja_template.py',
57 ['jinja_output != ""', {
58 'outputs': [ '<(jinja_output)' ],
60 'jinja_args': ['--output', '<(jinja_output)'],
63 ['jinja_outputs_zip != ""', {
64 'outputs': [ '<(jinja_outputs_zip)' ],
66 'jinja_args': ['--outputs-zip', '<(jinja_outputs_zip)'],
69 ['jinja_inputs_base_dir != ""', {
71 'jinja_args': ['--inputs-base-dir', '<(jinja_inputs_base_dir)'],
76 'python', '<(DEPTH)/build/android/gyp/jinja_template.py',
77 '--inputs', '<(jinja_inputs)',
78 '--variables', '<(jinja_variables)',