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 an action to provide a rule that
6 # inserts a chromium version string into native libraries.
8 # To use this, create a gyp target with the following form:
10 # 'action_name': 'insert_chromium_version',
13 # 'ordered_libraries_file': 'file generated by write_ordered_libraries'
14 # 'stripped_libraries_dir': 'the directory contains native libraries'
15 # 'input_paths': 'files to be added to the list of inputs'
16 # 'stamp': 'file to touch when the action is complete'
17 # 'version_string': 'chromium version string to be inserted'
18 # 'includes': [ '../../build/android/insert_chromium_version.gypi' ],
24 'message': 'Inserting chromium version string into native libraries',
29 '<(DEPTH)/build/android/gyp/util/build_utils.py',
30 '<(DEPTH)/build/android/gyp/insert_chromium_version.py',
31 '<(ordered_libraries_file)',
38 'python', '<(DEPTH)/build/android/gyp/insert_chromium_version.py',
39 '--android-objcopy=<(android_objcopy)',
40 '--stripped-libraries-dir=<(stripped_libraries_dir)',
41 '--libraries=@FileArg(<(ordered_libraries_file):libraries)',
42 '--version-string=<(version_string)',
46 ['component == "shared_library"', {
47 # Add a fake output to force the build to always re-run this step. This
48 # is required because the real inputs are not known at gyp-time and
49 # changing base.so may not trigger changes to dependent libraries.
50 'outputs': [ '<(stamp).fake' ]