Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: obj_int_extract.gypi

Issue 130563008: Refactoring unpack_lib_posix and obj_int_extract. (Closed) Base URL: http://src.chromium.org/svn/trunk/deps/third_party/libvpx
Patch Set: address comments Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« libvpx.gyp ('K') | « libvpx.gyp ('k') | unpack_lib_posix.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: obj_int_extract.gypi
diff --git a/obj_int_extract.gypi b/obj_int_extract.gypi
new file mode 100644
index 0000000000000000000000000000000000000000..908d61f2cf695b8bd3063c46ca8d67a1f4fe1737
--- /dev/null
+++ b/obj_int_extract.gypi
@@ -0,0 +1,60 @@
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# Rule to extract integer values for each symbol from an object file.
+# The output file name is the input file name with extension replaced with
+# asm or h.
+# The following gyp variables must be set before including this gypi:
+# output_format, the output format of integer value.
+# output_dir, the full path where the output file should be created.
+#
+# For example:
+#
+# 'sources': ['a.o', 'b.o'],
+# 'variables': {
+# 'output_format': 'cheader',
+# 'output_dir': 'output',
+# },
+# 'includes': ['obj_int_extract.gypi'],
+#
+# This extracts the symbol from a.o and b.o, and outputs them to a.h and b.h
+# in output directory.
+{
+ 'variables': {
+ 'conditions': [
+ ['os_posix==1', {
+ 'asm_obj_extension': 'o',
+ }],
+ ['OS=="win"', {
+ 'asm_obj_extension': 'obj',
+ }],
+ ['output_format=="cheader"', {
+ 'output_extension': 'h',
+ }, {
+ 'output_extension': 'asm',
+ }],
+ ],
+ },
+ 'rules': [
+ {
+ 'rule_name': 'obj_int_extract',
+ 'extension': '<(asm_obj_extension)',
+ 'inputs': [
+ '<(PRODUCT_DIR)/libvpx_obj_int_extract',
+ 'obj_int_extract.py',
+ ],
+ 'outputs': [
+ '<(output_dir)/<(RULE_INPUT_ROOT).<(output_extension)',
+ ],
+ 'action': [
+ '<(DEPTH)/third_party/libvpx/obj_int_extract.py',
+ '-e', '<(PRODUCT_DIR)/libvpx_obj_int_extract',
+ '-f', '<(output_format)',
+ '-b', '<(RULE_INPUT_PATH)',
+ '-o', '<(output_dir)/<(RULE_INPUT_ROOT).<(output_extension)',
+ ],
+ 'message': 'Generate assembly offsets <(RULE_INPUT_PATH)',
+ },
+ ],
+}
« libvpx.gyp ('K') | « libvpx.gyp ('k') | unpack_lib_posix.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698