summaryrefslogtreecommitdiff
path: root/deps/gyp/test/generator-output/rules
diff options
context:
space:
mode:
Diffstat (limited to 'deps/gyp/test/generator-output/rules')
-rw-r--r--deps/gyp/test/generator-output/rules/build/README.txt4
-rwxr-xr-xdeps/gyp/test/generator-output/rules/copy-file.py12
-rw-r--r--deps/gyp/test/generator-output/rules/rules.gyp16
-rw-r--r--deps/gyp/test/generator-output/rules/subdir1/build/README.txt4
-rw-r--r--deps/gyp/test/generator-output/rules/subdir1/define3.in01
-rw-r--r--deps/gyp/test/generator-output/rules/subdir1/define4.in01
-rw-r--r--deps/gyp/test/generator-output/rules/subdir1/executable.gyp59
-rw-r--r--deps/gyp/test/generator-output/rules/subdir1/function1.in16
-rw-r--r--deps/gyp/test/generator-output/rules/subdir1/function2.in16
-rw-r--r--deps/gyp/test/generator-output/rules/subdir1/program.c18
-rw-r--r--deps/gyp/test/generator-output/rules/subdir2/build/README.txt4
-rw-r--r--deps/gyp/test/generator-output/rules/subdir2/file1.in01
-rw-r--r--deps/gyp/test/generator-output/rules/subdir2/file2.in01
-rw-r--r--deps/gyp/test/generator-output/rules/subdir2/file3.in11
-rw-r--r--deps/gyp/test/generator-output/rules/subdir2/file4.in11
-rw-r--r--deps/gyp/test/generator-output/rules/subdir2/none.gyp49
-rw-r--r--deps/gyp/test/generator-output/rules/subdir2/rules-out/README.txt4
17 files changed, 188 insertions, 0 deletions
diff --git a/deps/gyp/test/generator-output/rules/build/README.txt b/deps/gyp/test/generator-output/rules/build/README.txt
new file mode 100644
index 0000000000..1b052c9a24
--- /dev/null
+++ b/deps/gyp/test/generator-output/rules/build/README.txt
@@ -0,0 +1,4 @@
+A place-holder for this Xcode build output directory, so that the
+test script can verify that .xcodeproj files are not created in
+their normal location by making the src/ read-only, and then
+selectively making this build directory writable.
diff --git a/deps/gyp/test/generator-output/rules/copy-file.py b/deps/gyp/test/generator-output/rules/copy-file.py
new file mode 100755
index 0000000000..938c336adb
--- /dev/null
+++ b/deps/gyp/test/generator-output/rules/copy-file.py
@@ -0,0 +1,12 @@
+#!/usr/bin/env python
+
+# 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.
+
+import sys
+
+contents = open(sys.argv[1], 'r').read()
+open(sys.argv[2], 'wb').write(contents)
+
+sys.exit(0)
diff --git a/deps/gyp/test/generator-output/rules/rules.gyp b/deps/gyp/test/generator-output/rules/rules.gyp
new file mode 100644
index 0000000000..dded59aff3
--- /dev/null
+++ b/deps/gyp/test/generator-output/rules/rules.gyp
@@ -0,0 +1,16 @@
+# 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': 'pull_in_all_actions',
+ 'type': 'none',
+ 'dependencies': [
+ 'subdir1/executable.gyp:*',
+ 'subdir2/none.gyp:*',
+ ],
+ },
+ ],
+}
diff --git a/deps/gyp/test/generator-output/rules/subdir1/build/README.txt b/deps/gyp/test/generator-output/rules/subdir1/build/README.txt
new file mode 100644
index 0000000000..1b052c9a24
--- /dev/null
+++ b/deps/gyp/test/generator-output/rules/subdir1/build/README.txt
@@ -0,0 +1,4 @@
+A place-holder for this Xcode build output directory, so that the
+test script can verify that .xcodeproj files are not created in
+their normal location by making the src/ read-only, and then
+selectively making this build directory writable.
diff --git a/deps/gyp/test/generator-output/rules/subdir1/define3.in0 b/deps/gyp/test/generator-output/rules/subdir1/define3.in0
new file mode 100644
index 0000000000..cc29c643f3
--- /dev/null
+++ b/deps/gyp/test/generator-output/rules/subdir1/define3.in0
@@ -0,0 +1 @@
+#define STRING3 "Hello from define3.in0\n"
diff --git a/deps/gyp/test/generator-output/rules/subdir1/define4.in0 b/deps/gyp/test/generator-output/rules/subdir1/define4.in0
new file mode 100644
index 0000000000..c9b0467b32
--- /dev/null
+++ b/deps/gyp/test/generator-output/rules/subdir1/define4.in0
@@ -0,0 +1 @@
+#define STRING4 "Hello from define4.in0\n"
diff --git a/deps/gyp/test/generator-output/rules/subdir1/executable.gyp b/deps/gyp/test/generator-output/rules/subdir1/executable.gyp
new file mode 100644
index 0000000000..42bee4d746
--- /dev/null
+++ b/deps/gyp/test/generator-output/rules/subdir1/executable.gyp
@@ -0,0 +1,59 @@
+# 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': 'program',
+ 'type': 'executable',
+ 'msvs_cygwin_shell': 0,
+ 'sources': [
+ 'program.c',
+ 'function1.in1',
+ 'function2.in1',
+ 'define3.in0',
+ 'define4.in0',
+ ],
+ 'include_dirs': [
+ '<(INTERMEDIATE_DIR)',
+ ],
+ 'rules': [
+ {
+ 'rule_name': 'copy_file_0',
+ 'extension': 'in0',
+ 'inputs': [
+ '../copy-file.py',
+ ],
+ 'outputs': [
+ # TODO: fix Make to support generated files not
+ # in a variable-named path like <(INTERMEDIATE_DIR)
+ #'<(RULE_INPUT_ROOT).c',
+ '<(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).h',
+ ],
+ 'action': [
+ 'python', '<(_inputs)', '<(RULE_INPUT_PATH)', '<@(_outputs)',
+ ],
+ 'process_outputs_as_sources': 0,
+ },
+ {
+ 'rule_name': 'copy_file_1',
+ 'extension': 'in1',
+ 'inputs': [
+ '../copy-file.py',
+ ],
+ 'outputs': [
+ # TODO: fix Make to support generated files not
+ # in a variable-named path like <(INTERMEDIATE_DIR)
+ #'<(RULE_INPUT_ROOT).c',
+ '<(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).c',
+ ],
+ 'action': [
+ 'python', '<(_inputs)', '<(RULE_INPUT_PATH)', '<@(_outputs)',
+ ],
+ 'process_outputs_as_sources': 1,
+ },
+ ],
+ },
+ ],
+}
diff --git a/deps/gyp/test/generator-output/rules/subdir1/function1.in1 b/deps/gyp/test/generator-output/rules/subdir1/function1.in1
new file mode 100644
index 0000000000..545e7ca16b
--- /dev/null
+++ b/deps/gyp/test/generator-output/rules/subdir1/function1.in1
@@ -0,0 +1,6 @@
+#include <stdio.h>
+
+void function1(void)
+{
+ printf("Hello from function1.in1\n");
+}
diff --git a/deps/gyp/test/generator-output/rules/subdir1/function2.in1 b/deps/gyp/test/generator-output/rules/subdir1/function2.in1
new file mode 100644
index 0000000000..6bad43f9cf
--- /dev/null
+++ b/deps/gyp/test/generator-output/rules/subdir1/function2.in1
@@ -0,0 +1,6 @@
+#include <stdio.h>
+
+void function2(void)
+{
+ printf("Hello from function2.in1\n");
+}
diff --git a/deps/gyp/test/generator-output/rules/subdir1/program.c b/deps/gyp/test/generator-output/rules/subdir1/program.c
new file mode 100644
index 0000000000..56b320632a
--- /dev/null
+++ b/deps/gyp/test/generator-output/rules/subdir1/program.c
@@ -0,0 +1,18 @@
+#include <stdio.h>
+#include "define3.h"
+#include "define4.h"
+
+extern void function1(void);
+extern void function2(void);
+extern void function3(void);
+extern void function4(void);
+
+int main(void)
+{
+ printf("Hello from program.c\n");
+ function1();
+ function2();
+ printf("%s", STRING3);
+ printf("%s", STRING4);
+ return 0;
+}
diff --git a/deps/gyp/test/generator-output/rules/subdir2/build/README.txt b/deps/gyp/test/generator-output/rules/subdir2/build/README.txt
new file mode 100644
index 0000000000..1b052c9a24
--- /dev/null
+++ b/deps/gyp/test/generator-output/rules/subdir2/build/README.txt
@@ -0,0 +1,4 @@
+A place-holder for this Xcode build output directory, so that the
+test script can verify that .xcodeproj files are not created in
+their normal location by making the src/ read-only, and then
+selectively making this build directory writable.
diff --git a/deps/gyp/test/generator-output/rules/subdir2/file1.in0 b/deps/gyp/test/generator-output/rules/subdir2/file1.in0
new file mode 100644
index 0000000000..7aca64f4ce
--- /dev/null
+++ b/deps/gyp/test/generator-output/rules/subdir2/file1.in0
@@ -0,0 +1 @@
+Hello from file1.in0
diff --git a/deps/gyp/test/generator-output/rules/subdir2/file2.in0 b/deps/gyp/test/generator-output/rules/subdir2/file2.in0
new file mode 100644
index 0000000000..80a281a2a9
--- /dev/null
+++ b/deps/gyp/test/generator-output/rules/subdir2/file2.in0
@@ -0,0 +1 @@
+Hello from file2.in0
diff --git a/deps/gyp/test/generator-output/rules/subdir2/file3.in1 b/deps/gyp/test/generator-output/rules/subdir2/file3.in1
new file mode 100644
index 0000000000..60ae2e7931
--- /dev/null
+++ b/deps/gyp/test/generator-output/rules/subdir2/file3.in1
@@ -0,0 +1 @@
+Hello from file3.in1
diff --git a/deps/gyp/test/generator-output/rules/subdir2/file4.in1 b/deps/gyp/test/generator-output/rules/subdir2/file4.in1
new file mode 100644
index 0000000000..5a3c30720e
--- /dev/null
+++ b/deps/gyp/test/generator-output/rules/subdir2/file4.in1
@@ -0,0 +1 @@
+Hello from file4.in1
diff --git a/deps/gyp/test/generator-output/rules/subdir2/none.gyp b/deps/gyp/test/generator-output/rules/subdir2/none.gyp
new file mode 100644
index 0000000000..664cbd9cb7
--- /dev/null
+++ b/deps/gyp/test/generator-output/rules/subdir2/none.gyp
@@ -0,0 +1,49 @@
+# 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.in0',
+ 'file2.in0',
+ 'file3.in1',
+ 'file4.in1',
+ ],
+ 'rules': [
+ {
+ 'rule_name': 'copy_file_0',
+ 'extension': 'in0',
+ 'inputs': [
+ '../copy-file.py',
+ ],
+ 'outputs': [
+ 'rules-out/<(RULE_INPUT_ROOT).out',
+ ],
+ 'action': [
+ 'python', '<(_inputs)', '<(RULE_INPUT_PATH)', '<@(_outputs)',
+ ],
+ 'process_outputs_as_sources': 0,
+ },
+ {
+ 'rule_name': 'copy_file_1',
+ 'extension': 'in1',
+ 'inputs': [
+ '../copy-file.py',
+ ],
+ 'outputs': [
+ 'rules-out/<(RULE_INPUT_ROOT).out',
+ ],
+ 'action': [
+ 'python', '<(_inputs)', '<(RULE_INPUT_PATH)', '<@(_outputs)',
+ ],
+ 'process_outputs_as_sources': 1,
+ },
+ ],
+ },
+ ],
+}
diff --git a/deps/gyp/test/generator-output/rules/subdir2/rules-out/README.txt b/deps/gyp/test/generator-output/rules/subdir2/rules-out/README.txt
new file mode 100644
index 0000000000..1b052c9a24
--- /dev/null
+++ b/deps/gyp/test/generator-output/rules/subdir2/rules-out/README.txt
@@ -0,0 +1,4 @@
+A place-holder for this Xcode build output directory, so that the
+test script can verify that .xcodeproj files are not created in
+their normal location by making the src/ read-only, and then
+selectively making this build directory writable.