Working around http://code.google.com/p/gyp/issues/detail?id=13
Visual Studio doesn't guarantee the 'copies' stanza is executed after the grit target, which can lead to a failure if it tries to copy the file before it's been generated. This puts the grit action in its own target, and making the copies stanza its own target that depends on the grit target.
Review URL: http://codereview.chromium.org/9581030
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125758 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/content/content_shell.gypi b/content/content_shell.gypi
index d89d38f..d809c858 100644
--- a/content/content_shell.gypi
+++ b/content/content_shell.gypi
@@ -122,6 +122,24 @@
{
'target_name': 'content_shell_resources',
'type': 'none',
+ 'dependencies': [
+ 'generate_content_shell_resources',
+ ],
+ 'variables': {
+ 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/content',
+ },
+ 'includes': [ '../build/grit_target.gypi' ],
+ 'copies': [
+ {
+ 'destination': '<(PRODUCT_DIR)',
+ 'files': [
+ '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak'
+ ],
+ },
+ ],
+ }, {
+ 'target_name': 'generate_content_shell_resources',
+ 'type': 'none',
'variables': {
'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/content',
},
@@ -134,15 +152,6 @@
'includes': [ '../build/grit_action.gypi' ],
},
],
- 'includes': [ '../build/grit_target.gypi' ],
- 'copies': [
- {
- 'destination': '<(PRODUCT_DIR)',
- 'files': [
- '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak'
- ],
- },
- ],
},
{
# We build a minimal set of resources so WebKit in content_shell has