summaryrefslogtreecommitdiffstats
path: root/third_party/python/gyp/test/rules/src/subdir1
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/python/gyp/test/rules/src/subdir1')
-rw-r--r--third_party/python/gyp/test/rules/src/subdir1/executable.gyp37
-rw-r--r--third_party/python/gyp/test/rules/src/subdir1/function1.in6
-rw-r--r--third_party/python/gyp/test/rules/src/subdir1/function2.in6
-rw-r--r--third_party/python/gyp/test/rules/src/subdir1/program.c12
4 files changed, 61 insertions, 0 deletions
diff --git a/third_party/python/gyp/test/rules/src/subdir1/executable.gyp b/third_party/python/gyp/test/rules/src/subdir1/executable.gyp
new file mode 100644
index 0000000000..c34cce5a92
--- /dev/null
+++ b/third_party/python/gyp/test/rules/src/subdir1/executable.gyp
@@ -0,0 +1,37 @@
+# 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.in',
+ 'function2.in',
+ ],
+ 'rules': [
+ {
+ 'rule_name': 'copy_file',
+ 'extension': 'in',
+ '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/third_party/python/gyp/test/rules/src/subdir1/function1.in b/third_party/python/gyp/test/rules/src/subdir1/function1.in
new file mode 100644
index 0000000000..60ff28949b
--- /dev/null
+++ b/third_party/python/gyp/test/rules/src/subdir1/function1.in
@@ -0,0 +1,6 @@
+#include <stdio.h>
+
+void function1(void)
+{
+ printf("Hello from function1.in\n");
+}
diff --git a/third_party/python/gyp/test/rules/src/subdir1/function2.in b/third_party/python/gyp/test/rules/src/subdir1/function2.in
new file mode 100644
index 0000000000..0fcfc03fdb
--- /dev/null
+++ b/third_party/python/gyp/test/rules/src/subdir1/function2.in
@@ -0,0 +1,6 @@
+#include <stdio.h>
+
+void function2(void)
+{
+ printf("Hello from function2.in\n");
+}
diff --git a/third_party/python/gyp/test/rules/src/subdir1/program.c b/third_party/python/gyp/test/rules/src/subdir1/program.c
new file mode 100644
index 0000000000..6b11ff9f67
--- /dev/null
+++ b/third_party/python/gyp/test/rules/src/subdir1/program.c
@@ -0,0 +1,12 @@
+#include <stdio.h>
+
+extern void function1(void);
+extern void function2(void);
+
+int main(void)
+{
+ printf("Hello from program.c\n");
+ function1();
+ function2();
+ return 0;
+}