diff options
author | Mike Morris <michael.patrick.morris@gmail.com> | 2015-12-04 13:29:51 -0500 |
---|---|---|
committer | Mike Morris <michael.patrick.morris@gmail.com> | 2015-12-07 15:48:34 -0800 |
commit | d467ae6e7867044b8d7b466776fb37089292c52b (patch) | |
tree | 730ee0656e6bf9f0dff33346f07acd800e83ab25 /deps/gyp/test/rules/src/subdir2 | |
parent | 59ef8da69549cf6308078c6f656affba96e9439e (diff) | |
download | qtlocation-mapboxgl-d467ae6e7867044b8d7b466776fb37089292c52b.tar.gz |
[core] upgrade gyp to git commit 6fb8bd8
https://chromium.googlesource.com/external/gyp/+/6fb8bd829f0ca8fd432fd85ede788b6881c4f09f
Diffstat (limited to 'deps/gyp/test/rules/src/subdir2')
-rw-r--r-- | deps/gyp/test/rules/src/subdir2/both_rule_and_action_input.gyp | 50 | ||||
-rw-r--r-- | deps/gyp/test/rules/src/subdir2/file1.in | 1 | ||||
-rw-r--r-- | deps/gyp/test/rules/src/subdir2/file2.in | 1 | ||||
-rw-r--r-- | deps/gyp/test/rules/src/subdir2/never_used.gyp | 31 | ||||
-rw-r--r-- | deps/gyp/test/rules/src/subdir2/no_action.gyp | 38 | ||||
-rw-r--r-- | deps/gyp/test/rules/src/subdir2/no_inputs.gyp | 32 | ||||
-rw-r--r-- | deps/gyp/test/rules/src/subdir2/none.gyp | 33 | ||||
-rw-r--r-- | deps/gyp/test/rules/src/subdir2/program.c | 12 |
8 files changed, 198 insertions, 0 deletions
diff --git a/deps/gyp/test/rules/src/subdir2/both_rule_and_action_input.gyp b/deps/gyp/test/rules/src/subdir2/both_rule_and_action_input.gyp new file mode 100644 index 0000000000..e5e6f3ec2b --- /dev/null +++ b/deps/gyp/test/rules/src/subdir2/both_rule_and_action_input.gyp @@ -0,0 +1,50 @@ +# Copyright (c) 2014 Google Inc. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# Tests that if a rule input is also an action input, both the rule and action +# are executed +{ + 'targets': [ + { + 'target_name': 'files_both_rule_and_action_input', + 'type': 'executable', + 'msvs_cygwin_shell': 0, + 'sources': [ + 'program.c', + 'file1.in', + 'file2.in', + ], + 'rules': [ + { + 'rule_name': 'copy_file', + 'extension': 'in', + 'inputs': [ + '../copy-file.py', + ], + 'outputs': [ + '<(RULE_INPUT_ROOT).out4', + ], + 'action': [ + 'python', '<(_inputs)', '<(RULE_INPUT_PATH)', '<@(_outputs)', + ], + }, + ], + 'actions': [ + { + 'action_name': 'copy_file1_in', + 'inputs': [ + '../copy-file.py', + 'file1.in', + ], + 'outputs': [ + 'file1.copy', + ], + 'action': [ + 'python', '<@(_inputs)', '<(_outputs)' + ], + }, + ], + }, + ], +} diff --git a/deps/gyp/test/rules/src/subdir2/file1.in b/deps/gyp/test/rules/src/subdir2/file1.in new file mode 100644 index 0000000000..86ac3ad389 --- /dev/null +++ b/deps/gyp/test/rules/src/subdir2/file1.in @@ -0,0 +1 @@ +Hello from file1.in diff --git a/deps/gyp/test/rules/src/subdir2/file2.in b/deps/gyp/test/rules/src/subdir2/file2.in new file mode 100644 index 0000000000..bf83d8ecec --- /dev/null +++ b/deps/gyp/test/rules/src/subdir2/file2.in @@ -0,0 +1 @@ +Hello from file2.in diff --git a/deps/gyp/test/rules/src/subdir2/never_used.gyp b/deps/gyp/test/rules/src/subdir2/never_used.gyp new file mode 100644 index 0000000000..17f6f55371 --- /dev/null +++ b/deps/gyp/test/rules/src/subdir2/never_used.gyp @@ -0,0 +1,31 @@ +# Copyright (c) 2009 Google Inc. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# Test that the case where there is a rule that doesn't apply to anything. +{ + 'targets': [ + { + 'target_name': 'files_no_input2', + 'type': 'none', + 'msvs_cygwin_shell': 0, + 'sources': [ + 'file1.in', + 'file2.in', + ], + 'rules': [ + { + 'rule_name': 'copy_file3', + 'extension': 'in2', + 'outputs': [ + '<(RULE_INPUT_ROOT).out3', + ], + 'action': [ + 'python', '../copy-file.py', '<(RULE_INPUT_PATH)', '<@(_outputs)', + ], + 'process_outputs_as_sources': 1, + }, + ], + }, + ], +} diff --git a/deps/gyp/test/rules/src/subdir2/no_action.gyp b/deps/gyp/test/rules/src/subdir2/no_action.gyp new file mode 100644 index 0000000000..ffa1cefe18 --- /dev/null +++ b/deps/gyp/test/rules/src/subdir2/no_action.gyp @@ -0,0 +1,38 @@ +# Copyright (c) 2012 Google Inc. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# Test that the case where an action is only specified under a conditional is +# evaluated appropriately. +{ + 'targets': [ + { + 'target_name': 'extension_does_not_match_sources_and_no_action', + 'type': 'none', + 'msvs_cygwin_shell': 0, + 'sources': [ + 'file1.in', + 'file2.in', + ], + 'rules': [ + { + 'rule_name': 'assemble', + 'extension': 'asm', + 'outputs': [ + '<(RULE_INPUT_ROOT).fail', + ], + 'conditions': [ + # Always fails. + [ '"true"=="false"', { + 'action': [ + 'python', '../copy-file.py', '<(RULE_INPUT_PATH)', '<@(_outputs)', + ], + 'process_outputs_as_sources': 1, + 'message': 'test_rule', + }], + ], + }, + ], + }, + ], +} diff --git a/deps/gyp/test/rules/src/subdir2/no_inputs.gyp b/deps/gyp/test/rules/src/subdir2/no_inputs.gyp new file mode 100644 index 0000000000..e61a1a3ff6 --- /dev/null +++ b/deps/gyp/test/rules/src/subdir2/no_inputs.gyp @@ -0,0 +1,32 @@ +# Copyright (c) 2009 Google Inc. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# Test that the case where there are no inputs (other than the +# file the rule applies to). +{ + 'targets': [ + { + 'target_name': 'files_no_input', + 'type': 'none', + 'msvs_cygwin_shell': 0, + 'sources': [ + 'file1.in', + 'file2.in', + ], + 'rules': [ + { + 'rule_name': 'copy_file2', + 'extension': 'in', + 'outputs': [ + '<(RULE_INPUT_ROOT).out2', + ], + 'action': [ + 'python', '../copy-file.py', '<(RULE_INPUT_PATH)', '<@(_outputs)', + ], + 'process_outputs_as_sources': 1, + }, + ], + }, + ], +} diff --git a/deps/gyp/test/rules/src/subdir2/none.gyp b/deps/gyp/test/rules/src/subdir2/none.gyp new file mode 100644 index 0000000000..38bcdabdf6 --- /dev/null +++ b/deps/gyp/test/rules/src/subdir2/none.gyp @@ -0,0 +1,33 @@ +# Copyright (c) 2009 Google Inc. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +{ + 'targets': [ + { + 'target_name': 'files', + 'type': 'none', + 'msvs_cygwin_shell': 0, + 'sources': [ + 'file1.in', + 'file2.in', + ], + 'rules': [ + { + 'rule_name': 'copy_file', + 'extension': 'in', + 'inputs': [ + '../copy-file.py', + ], + 'outputs': [ + '<(RULE_INPUT_ROOT).out', + ], + 'action': [ + 'python', '<(_inputs)', '<(RULE_INPUT_PATH)', '<@(_outputs)', + ], + 'process_outputs_as_sources': 1, + }, + ], + }, + ], +} diff --git a/deps/gyp/test/rules/src/subdir2/program.c b/deps/gyp/test/rules/src/subdir2/program.c new file mode 100644 index 0000000000..e5db175148 --- /dev/null +++ b/deps/gyp/test/rules/src/subdir2/program.c @@ -0,0 +1,12 @@ +/* Copyright (c) 2014 Google Inc. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include <stdio.h> + +int main(void) +{ + printf("Hello from program.c\n"); + return 0; +} |