Index: third_party/WebKit/Source/build/ConvertFileToHeaderWithCharacterArray.gypi |
diff --git a/third_party/WebKit/Source/build/ConvertFileToHeaderWithCharacterArray.gypi b/third_party/WebKit/Source/build/ConvertFileToHeaderWithCharacterArray.gypi |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b66b59367fb29dd06f908f2b58c54e227c8faea3 |
--- /dev/null |
+++ b/third_party/WebKit/Source/build/ConvertFileToHeaderWithCharacterArray.gypi |
@@ -0,0 +1,37 @@ |
+# Copyright 2016 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. |
+# |
+# To use this, create a gyp target with the following form: |
+# { |
+# 'target_name': 'GenerateInjectedScriptSource', |
+# 'type': 'none', |
+# 'variables': { |
+# 'input_file_path': 'inspector/v8/InjectedScriptSource.js'', |
+# 'output_file_path': '<(SHARED_INTERMEDIATE_DIR)/blink/InjectedScriptSource.h', |
+# 'character_array_name': 'InjectedScriptSource_js', |
+# }, |
+# 'includes': [ 'ConvertFileToHeaderWithCharacterArray.gypi' ], |
+# }, |
+{ |
+ 'actions': [ |
+ { |
+ 'action_name': 'ConvertFileToHeaderWithCharacterArray', |
+ 'inputs': [ |
+ '../build/scripts/xxd.py', |
+ '<(input_file_path)', |
+ ], |
+ 'outputs': [ '<@(output_file_path)', ], |
+ 'action': [ |
+ 'python', |
+ '../build/scripts/xxd.py', |
+ '<(character_array_name)', |
+ '<(input_file_path)', |
+ '<@(_outputs)' |
+ ], |
+ 'message': 'Generating <(output_file_path) from <(input_file_path)', |
+ }, |
+ ], |
+ # Since this target generates header files, it needs to be a hard dependency. |
+ 'hard_dependency': 1, |
+} |