From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- .../src/subdir2/both_rule_and_action_input.gyp | 50 ++++++++++++++++++++++ .../python/gyp/test/rules/src/subdir2/file1.in | 1 + .../python/gyp/test/rules/src/subdir2/file2.in | 1 + .../gyp/test/rules/src/subdir2/never_used.gyp | 31 ++++++++++++++ .../gyp/test/rules/src/subdir2/no_action.gyp | 38 ++++++++++++++++ .../gyp/test/rules/src/subdir2/no_inputs.gyp | 32 ++++++++++++++ .../python/gyp/test/rules/src/subdir2/none.gyp | 33 ++++++++++++++ .../python/gyp/test/rules/src/subdir2/program.c | 12 ++++++ 8 files changed, 198 insertions(+) create mode 100644 third_party/python/gyp/test/rules/src/subdir2/both_rule_and_action_input.gyp create mode 100644 third_party/python/gyp/test/rules/src/subdir2/file1.in create mode 100644 third_party/python/gyp/test/rules/src/subdir2/file2.in create mode 100644 third_party/python/gyp/test/rules/src/subdir2/never_used.gyp create mode 100644 third_party/python/gyp/test/rules/src/subdir2/no_action.gyp create mode 100644 third_party/python/gyp/test/rules/src/subdir2/no_inputs.gyp create mode 100644 third_party/python/gyp/test/rules/src/subdir2/none.gyp create mode 100644 third_party/python/gyp/test/rules/src/subdir2/program.c (limited to 'third_party/python/gyp/test/rules/src/subdir2') diff --git a/third_party/python/gyp/test/rules/src/subdir2/both_rule_and_action_input.gyp b/third_party/python/gyp/test/rules/src/subdir2/both_rule_and_action_input.gyp new file mode 100644 index 0000000000..e5e6f3ec2b --- /dev/null +++ b/third_party/python/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/third_party/python/gyp/test/rules/src/subdir2/file1.in b/third_party/python/gyp/test/rules/src/subdir2/file1.in new file mode 100644 index 0000000000..86ac3ad389 --- /dev/null +++ b/third_party/python/gyp/test/rules/src/subdir2/file1.in @@ -0,0 +1 @@ +Hello from file1.in diff --git a/third_party/python/gyp/test/rules/src/subdir2/file2.in b/third_party/python/gyp/test/rules/src/subdir2/file2.in new file mode 100644 index 0000000000..bf83d8ecec --- /dev/null +++ b/third_party/python/gyp/test/rules/src/subdir2/file2.in @@ -0,0 +1 @@ +Hello from file2.in diff --git a/third_party/python/gyp/test/rules/src/subdir2/never_used.gyp b/third_party/python/gyp/test/rules/src/subdir2/never_used.gyp new file mode 100644 index 0000000000..17f6f55371 --- /dev/null +++ b/third_party/python/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/third_party/python/gyp/test/rules/src/subdir2/no_action.gyp b/third_party/python/gyp/test/rules/src/subdir2/no_action.gyp new file mode 100644 index 0000000000..ffa1cefe18 --- /dev/null +++ b/third_party/python/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/third_party/python/gyp/test/rules/src/subdir2/no_inputs.gyp b/third_party/python/gyp/test/rules/src/subdir2/no_inputs.gyp new file mode 100644 index 0000000000..e61a1a3ff6 --- /dev/null +++ b/third_party/python/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/third_party/python/gyp/test/rules/src/subdir2/none.gyp b/third_party/python/gyp/test/rules/src/subdir2/none.gyp new file mode 100644 index 0000000000..38bcdabdf6 --- /dev/null +++ b/third_party/python/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/third_party/python/gyp/test/rules/src/subdir2/program.c b/third_party/python/gyp/test/rules/src/subdir2/program.c new file mode 100644 index 0000000000..e5db175148 --- /dev/null +++ b/third_party/python/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 + +int main(void) +{ + printf("Hello from program.c\n"); + return 0; +} -- cgit v1.2.3