From c4daddcf734bc087796f5f8a2a7d47b50a42552b Mon Sep 17 00:00:00 2001
From: "thomasvl@chromium.org"
 <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Tue, 29 Mar 2011 19:07:37 +0000
Subject: Standardize grit invokes (part 2)

Switch the 4 webkit related grd files over to using the gypi files to get
consistant sytax.  Since the webkit version action already uses something
from build/util, I'm thinking these paths will be ok in both a chromium
checkout and a webkit checkout.

BUG=22247
TEST=everything still builds and is localized
Review URL: http://codereview.chromium.org/6773012

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79716 0039d316-1c4b-4281-b951-d872f2087c98
---
 webkit/glue/webkit_glue.gypi | 88 ++++++--------------------------------------
 1 file changed, 11 insertions(+), 77 deletions(-)

(limited to 'webkit')

diff --git a/webkit/glue/webkit_glue.gypi b/webkit/glue/webkit_glue.gypi
index 0cc1349..7ab4a38 100644
--- a/webkit/glue/webkit_glue.gypi
+++ b/webkit/glue/webkit_glue.gypi
@@ -11,10 +11,6 @@
         'webkit_src_dir': '../../third_party/WebKit',
       }],
     ],
-
-    'grit_info_cmd': ['python', '<(DEPTH)/tools/grit/grit_info.py',
-                      '<@(grit_defines)'],
-    'grit_cmd': ['python', '<(DEPTH)/tools/grit/grit.py'],
   },
   'targets': [
     {
@@ -28,48 +24,19 @@
         {
           'action_name': 'webkit_resources',
           'variables': {
-            'input_path': './webkit_resources.grd',
+            'grit_grd_file': 'webkit_resources.grd',
           },
-          'inputs': [
-            '<!@(<(grit_info_cmd) --inputs <(input_path))',
-          ],
-          'outputs': [
-            '<!@(<(grit_info_cmd) --outputs \'<(grit_out_dir)\' <(input_path))',
-          ],
-          'action': ['<@(grit_cmd)',
-                     '-i', '<(input_path)', 'build',
-                     '-o', '<(grit_out_dir)',
-                     '<@(grit_defines)'],
-          'message': 'Generating resources from <(input_path)',
+          'includes': [ '../../build/grit_action.gypi' ],
         },
         {
           'action_name': 'webkit_chromium_resources',
           'variables': {
-            'input_path': '<(webkit_src_dir)/Source/WebKit/chromium/WebKit.grd',
+            'grit_grd_file': '<(webkit_src_dir)/Source/WebKit/chromium/WebKit.grd',
           },
-          'inputs': [
-            '<!@(<(grit_info_cmd) --inputs <(input_path))',
-          ],
-          'outputs': [
-            '<!@(<(grit_info_cmd) --outputs \'<(grit_out_dir)\' <(input_path))',
-          ],
-          'action': ['<@(grit_cmd)',
-                     '-i', '<(input_path)', 'build',
-                     '-o', '<(grit_out_dir)',
-                     '<@(grit_defines)'],
-          'message': 'Generating resources from <(input_path)',
+          'includes': [ '../../build/grit_action.gypi' ],
         },
       ],
-      'direct_dependent_settings': {
-        'include_dirs': [
-          '<(SHARED_INTERMEDIATE_DIR)/webkit',
-        ],
-      },
-      'conditions': [
-        ['OS=="win"', {
-          'dependencies': ['<(DEPTH)/build/win/system.gyp:cygwin'],
-        }],
-      ],
+      'includes': [ '../../build/grit_target.gypi' ],
     },
     {
       'target_name': 'webkit_strings',
@@ -82,31 +49,12 @@
         {
           'action_name': 'webkit_strings',
           'variables': {
-            'input_path': './webkit_strings.grd',
+            'grit_grd_file': 'webkit_strings.grd',
           },
-          'inputs': [
-            '<!@(<(grit_info_cmd) --inputs <(input_path))',
-          ],
-          'outputs': [
-            '<!@(<(grit_info_cmd) --outputs \'<(grit_out_dir)\' <(input_path))',
-          ],
-          'action': ['<@(grit_cmd)',
-                     '-i', '<(input_path)', 'build',
-                     '-o', '<(grit_out_dir)',
-                     '<@(grit_defines)'],
-          'message': 'Generating resources from <(input_path)',
+          'includes': [ '../../build/grit_action.gypi' ],
         },
       ],
-      'direct_dependent_settings': {
-        'include_dirs': [
-          '<(SHARED_INTERMEDIATE_DIR)/webkit',
-        ],
-      },
-      'conditions': [
-        ['OS=="win"', {
-          'dependencies': ['<(DEPTH)/build/win/system.gyp:cygwin'],
-        }],
-      ],
+      'includes': [ '../../build/grit_target.gypi' ],
     },
     {
       'target_name': 'webkit_user_agent',
@@ -566,26 +514,12 @@
             {
               'action_name': 'inspector_strings',
               'variables': {
-                'input_path': './inspector_strings.grd',
+                'grit_grd_file': 'inspector_strings.grd',
               },
-              'inputs': [
-                '<!@(<(grit_info_cmd) --inputs <(input_path))',
-              ],
-              'outputs': [
-                '<!@(<(grit_info_cmd) --outputs \'<(grit_out_dir)\' <(input_path))',
-              ],
-              'action': ['<@(grit_cmd)',
-                         '-i', '<(input_path)', 'build',
-                         '-o', '<(grit_out_dir)',
-                         '<@(grit_defines)'],
-              'message': 'Generating resources from <(input_path)',
+              'includes': [ '../../build/grit_action.gypi' ],
             },
           ],
-          'conditions': [
-            ['OS=="win"', {
-              'dependencies': ['<(DEPTH)/build/win/system.gyp:cygwin'],
-            }],
-          ],
+          'includes': [ '../../build/grit_target.gypi' ],
         },
       ],
     }],
-- 
cgit v1.1