summaryrefslogtreecommitdiffstats
path: root/third_party/python/gyp/test/generator-output
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
commit43a97878ce14b72f0981164f87f2e35e14151312 (patch)
tree620249daf56c0258faa40cbdcf9cfba06de2a846 /third_party/python/gyp/test/generator-output
parentInitial commit. (diff)
downloadfirefox-upstream.tar.xz
firefox-upstream.zip
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/python/gyp/test/generator-output')
-rw-r--r--third_party/python/gyp/test/generator-output/actions/actions.gyp16
-rw-r--r--third_party/python/gyp/test/generator-output/actions/build/README.txt4
-rw-r--r--third_party/python/gyp/test/generator-output/actions/subdir1/actions-out/README.txt4
-rw-r--r--third_party/python/gyp/test/generator-output/actions/subdir1/build/README.txt4
-rw-r--r--third_party/python/gyp/test/generator-output/actions/subdir1/executable.gyp44
-rwxr-xr-xthird_party/python/gyp/test/generator-output/actions/subdir1/make-prog1.py20
-rwxr-xr-xthird_party/python/gyp/test/generator-output/actions/subdir1/make-prog2.py20
-rw-r--r--third_party/python/gyp/test/generator-output/actions/subdir1/program.c12
-rw-r--r--third_party/python/gyp/test/generator-output/actions/subdir2/actions-out/README.txt4
-rw-r--r--third_party/python/gyp/test/generator-output/actions/subdir2/build/README.txt4
-rwxr-xr-xthird_party/python/gyp/test/generator-output/actions/subdir2/make-file.py11
-rw-r--r--third_party/python/gyp/test/generator-output/actions/subdir2/none.gyp31
-rw-r--r--third_party/python/gyp/test/generator-output/copies/build/README.txt4
-rw-r--r--third_party/python/gyp/test/generator-output/copies/copies-out/README.txt4
-rw-r--r--third_party/python/gyp/test/generator-output/copies/copies.gyp50
-rw-r--r--third_party/python/gyp/test/generator-output/copies/file11
-rw-r--r--third_party/python/gyp/test/generator-output/copies/file21
-rw-r--r--third_party/python/gyp/test/generator-output/copies/subdir/build/README.txt4
-rw-r--r--third_party/python/gyp/test/generator-output/copies/subdir/copies-out/README.txt4
-rw-r--r--third_party/python/gyp/test/generator-output/copies/subdir/file31
-rw-r--r--third_party/python/gyp/test/generator-output/copies/subdir/file41
-rw-r--r--third_party/python/gyp/test/generator-output/copies/subdir/subdir.gyp32
-rwxr-xr-xthird_party/python/gyp/test/generator-output/gyptest-actions.py57
-rwxr-xr-xthird_party/python/gyp/test/generator-output/gyptest-copies.py59
-rwxr-xr-xthird_party/python/gyp/test/generator-output/gyptest-depth.py58
-rw-r--r--third_party/python/gyp/test/generator-output/gyptest-mac-bundle.py33
-rwxr-xr-xthird_party/python/gyp/test/generator-output/gyptest-relocate.py59
-rwxr-xr-xthird_party/python/gyp/test/generator-output/gyptest-rules.py58
-rwxr-xr-xthird_party/python/gyp/test/generator-output/gyptest-subdir2-deep.py36
-rwxr-xr-xthird_party/python/gyp/test/generator-output/gyptest-symlink.py44
-rwxr-xr-xthird_party/python/gyp/test/generator-output/gyptest-top-all.py53
-rw-r--r--third_party/python/gyp/test/generator-output/mac-bundle/Info.plist32
-rw-r--r--third_party/python/gyp/test/generator-output/mac-bundle/app.order1
-rw-r--r--third_party/python/gyp/test/generator-output/mac-bundle/header.h1
-rw-r--r--third_party/python/gyp/test/generator-output/mac-bundle/main.c1
-rw-r--r--third_party/python/gyp/test/generator-output/mac-bundle/resource.sb1
-rw-r--r--third_party/python/gyp/test/generator-output/mac-bundle/test.gyp25
-rw-r--r--third_party/python/gyp/test/generator-output/rules/build/README.txt4
-rwxr-xr-xthird_party/python/gyp/test/generator-output/rules/copy-file.py12
-rw-r--r--third_party/python/gyp/test/generator-output/rules/rules.gyp16
-rw-r--r--third_party/python/gyp/test/generator-output/rules/subdir1/build/README.txt4
-rw-r--r--third_party/python/gyp/test/generator-output/rules/subdir1/define3.in01
-rw-r--r--third_party/python/gyp/test/generator-output/rules/subdir1/define4.in01
-rw-r--r--third_party/python/gyp/test/generator-output/rules/subdir1/executable.gyp59
-rw-r--r--third_party/python/gyp/test/generator-output/rules/subdir1/function1.in16
-rw-r--r--third_party/python/gyp/test/generator-output/rules/subdir1/function2.in16
-rw-r--r--third_party/python/gyp/test/generator-output/rules/subdir1/program.c18
-rw-r--r--third_party/python/gyp/test/generator-output/rules/subdir2/build/README.txt4
-rw-r--r--third_party/python/gyp/test/generator-output/rules/subdir2/file1.in01
-rw-r--r--third_party/python/gyp/test/generator-output/rules/subdir2/file2.in01
-rw-r--r--third_party/python/gyp/test/generator-output/rules/subdir2/file3.in11
-rw-r--r--third_party/python/gyp/test/generator-output/rules/subdir2/file4.in11
-rw-r--r--third_party/python/gyp/test/generator-output/rules/subdir2/none.gyp49
-rw-r--r--third_party/python/gyp/test/generator-output/rules/subdir2/rules-out/README.txt4
-rw-r--r--third_party/python/gyp/test/generator-output/src/build/README.txt4
-rw-r--r--third_party/python/gyp/test/generator-output/src/inc.h1
-rw-r--r--third_party/python/gyp/test/generator-output/src/inc1/include1.h1
-rw-r--r--third_party/python/gyp/test/generator-output/src/prog1.c18
-rw-r--r--third_party/python/gyp/test/generator-output/src/prog1.gyp28
-rw-r--r--third_party/python/gyp/test/generator-output/src/subdir2/build/README.txt4
-rw-r--r--third_party/python/gyp/test/generator-output/src/subdir2/deeper/build/README.txt4
-rw-r--r--third_party/python/gyp/test/generator-output/src/subdir2/deeper/deeper.c7
-rw-r--r--third_party/python/gyp/test/generator-output/src/subdir2/deeper/deeper.gyp18
-rw-r--r--third_party/python/gyp/test/generator-output/src/subdir2/deeper/deeper.h1
-rw-r--r--third_party/python/gyp/test/generator-output/src/subdir2/inc2/include2.h1
-rw-r--r--third_party/python/gyp/test/generator-output/src/subdir2/prog2.c18
-rw-r--r--third_party/python/gyp/test/generator-output/src/subdir2/prog2.gyp28
-rw-r--r--third_party/python/gyp/test/generator-output/src/subdir3/build/README.txt4
-rw-r--r--third_party/python/gyp/test/generator-output/src/subdir3/inc3/include3.h1
-rw-r--r--third_party/python/gyp/test/generator-output/src/subdir3/prog3.c18
-rw-r--r--third_party/python/gyp/test/generator-output/src/subdir3/prog3.gyp25
-rw-r--r--third_party/python/gyp/test/generator-output/src/symroot.gypi16
72 files changed, 1179 insertions, 0 deletions
diff --git a/third_party/python/gyp/test/generator-output/actions/actions.gyp b/third_party/python/gyp/test/generator-output/actions/actions.gyp
new file mode 100644
index 0000000000..dded59aff3
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/actions/actions.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/third_party/python/gyp/test/generator-output/actions/build/README.txt b/third_party/python/gyp/test/generator-output/actions/build/README.txt
new file mode 100644
index 0000000000..1b052c9a24
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/actions/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/third_party/python/gyp/test/generator-output/actions/subdir1/actions-out/README.txt b/third_party/python/gyp/test/generator-output/actions/subdir1/actions-out/README.txt
new file mode 100644
index 0000000000..1b052c9a24
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/actions/subdir1/actions-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.
diff --git a/third_party/python/gyp/test/generator-output/actions/subdir1/build/README.txt b/third_party/python/gyp/test/generator-output/actions/subdir1/build/README.txt
new file mode 100644
index 0000000000..1b052c9a24
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/actions/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/third_party/python/gyp/test/generator-output/actions/subdir1/executable.gyp b/third_party/python/gyp/test/generator-output/actions/subdir1/executable.gyp
new file mode 100644
index 0000000000..6bdd60a1fb
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/actions/subdir1/executable.gyp
@@ -0,0 +1,44 @@
+# 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',
+ ],
+ 'actions': [
+ {
+ 'action_name': 'make-prog1',
+ 'inputs': [
+ 'make-prog1.py',
+ ],
+ 'outputs': [
+ '<(INTERMEDIATE_DIR)/prog1.c',
+ ],
+ 'action': [
+ 'python', '<(_inputs)', '<@(_outputs)',
+ ],
+ 'process_outputs_as_sources': 1,
+ },
+ {
+ 'action_name': 'make-prog2',
+ 'inputs': [
+ 'make-prog2.py',
+ ],
+ 'outputs': [
+ 'actions-out/prog2.c',
+ ],
+ 'action': [
+ 'python', '<(_inputs)', '<@(_outputs)',
+ ],
+ 'process_outputs_as_sources': 1,
+ },
+ ],
+ },
+ ],
+}
diff --git a/third_party/python/gyp/test/generator-output/actions/subdir1/make-prog1.py b/third_party/python/gyp/test/generator-output/actions/subdir1/make-prog1.py
new file mode 100755
index 0000000000..7ea1d8a2d4
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/actions/subdir1/make-prog1.py
@@ -0,0 +1,20 @@
+#!/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 = r"""
+#include <stdio.h>
+
+void prog1(void)
+{
+ printf("Hello from make-prog1.py\n");
+}
+"""
+
+open(sys.argv[1], 'w').write(contents)
+
+sys.exit(0)
diff --git a/third_party/python/gyp/test/generator-output/actions/subdir1/make-prog2.py b/third_party/python/gyp/test/generator-output/actions/subdir1/make-prog2.py
new file mode 100755
index 0000000000..0bfe4973c2
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/actions/subdir1/make-prog2.py
@@ -0,0 +1,20 @@
+#!/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 = r"""
+#include <stdio.h>
+
+void prog2(void)
+{
+ printf("Hello from make-prog2.py\n");
+}
+"""
+
+open(sys.argv[1], 'w').write(contents)
+
+sys.exit(0)
diff --git a/third_party/python/gyp/test/generator-output/actions/subdir1/program.c b/third_party/python/gyp/test/generator-output/actions/subdir1/program.c
new file mode 100644
index 0000000000..c0931534eb
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/actions/subdir1/program.c
@@ -0,0 +1,12 @@
+#include <stdio.h>
+
+extern void prog1(void);
+extern void prog2(void);
+
+int main(void)
+{
+ printf("Hello from program.c\n");
+ prog1();
+ prog2();
+ return 0;
+}
diff --git a/third_party/python/gyp/test/generator-output/actions/subdir2/actions-out/README.txt b/third_party/python/gyp/test/generator-output/actions/subdir2/actions-out/README.txt
new file mode 100644
index 0000000000..1b052c9a24
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/actions/subdir2/actions-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.
diff --git a/third_party/python/gyp/test/generator-output/actions/subdir2/build/README.txt b/third_party/python/gyp/test/generator-output/actions/subdir2/build/README.txt
new file mode 100644
index 0000000000..1b052c9a24
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/actions/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/third_party/python/gyp/test/generator-output/actions/subdir2/make-file.py b/third_party/python/gyp/test/generator-output/actions/subdir2/make-file.py
new file mode 100755
index 0000000000..088a05e0b0
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/actions/subdir2/make-file.py
@@ -0,0 +1,11 @@
+#!/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 = "Hello from make-file.py\n"
+
+open(sys.argv[1], 'w').write(contents)
diff --git a/third_party/python/gyp/test/generator-output/actions/subdir2/none.gyp b/third_party/python/gyp/test/generator-output/actions/subdir2/none.gyp
new file mode 100644
index 0000000000..f98f52753d
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/actions/subdir2/none.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.
+
+{
+ 'targets': [
+ {
+ 'target_name': 'file',
+ 'type': 'none',
+ 'msvs_cygwin_shell': 0,
+ 'actions': [
+ {
+ 'action_name': 'make-file',
+ 'inputs': [
+ 'make-file.py',
+ ],
+ 'outputs': [
+ 'actions-out/file.out',
+ # TODO: enhance testing infrastructure to test this
+ # without having to hard-code the intermediate dir paths.
+ #'<(INTERMEDIATE_DIR)/file.out',
+ ],
+ 'action': [
+ 'python', '<(_inputs)', '<@(_outputs)',
+ ],
+ 'process_outputs_as_sources': 1,
+ }
+ ],
+ },
+ ],
+}
diff --git a/third_party/python/gyp/test/generator-output/copies/build/README.txt b/third_party/python/gyp/test/generator-output/copies/build/README.txt
new file mode 100644
index 0000000000..90ef886193
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/copies/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/third_party/python/gyp/test/generator-output/copies/copies-out/README.txt b/third_party/python/gyp/test/generator-output/copies/copies-out/README.txt
new file mode 100644
index 0000000000..90ef886193
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/copies/copies-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.
diff --git a/third_party/python/gyp/test/generator-output/copies/copies.gyp b/third_party/python/gyp/test/generator-output/copies/copies.gyp
new file mode 100644
index 0000000000..479a3d9b6e
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/copies/copies.gyp
@@ -0,0 +1,50 @@
+# 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_subdir',
+ 'type': 'none',
+ 'dependencies': [
+ 'subdir/subdir.gyp:*',
+ ],
+ },
+ {
+ 'target_name': 'copies1',
+ 'type': 'none',
+ 'copies': [
+ {
+ 'destination': 'copies-out',
+ 'files': [
+ 'file1',
+ ],
+ },
+ ],
+ },
+ {
+ 'target_name': 'copies2',
+ 'type': 'none',
+ 'copies': [
+ {
+ 'destination': '<(PRODUCT_DIR)/copies-out',
+ 'files': [
+ 'file2',
+ ],
+ },
+ ],
+ },
+ # Verify that a null 'files' list doesn't gag the generators.
+ {
+ 'target_name': 'copies_null',
+ 'type': 'none',
+ 'copies': [
+ {
+ 'destination': '<(PRODUCT_DIR)/copies-null',
+ 'files': [],
+ },
+ ],
+ },
+ ],
+}
diff --git a/third_party/python/gyp/test/generator-output/copies/file1 b/third_party/python/gyp/test/generator-output/copies/file1
new file mode 100644
index 0000000000..84d55c5759
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/copies/file1
@@ -0,0 +1 @@
+file1 contents
diff --git a/third_party/python/gyp/test/generator-output/copies/file2 b/third_party/python/gyp/test/generator-output/copies/file2
new file mode 100644
index 0000000000..af1b8ae35d
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/copies/file2
@@ -0,0 +1 @@
+file2 contents
diff --git a/third_party/python/gyp/test/generator-output/copies/subdir/build/README.txt b/third_party/python/gyp/test/generator-output/copies/subdir/build/README.txt
new file mode 100644
index 0000000000..90ef886193
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/copies/subdir/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/third_party/python/gyp/test/generator-output/copies/subdir/copies-out/README.txt b/third_party/python/gyp/test/generator-output/copies/subdir/copies-out/README.txt
new file mode 100644
index 0000000000..90ef886193
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/copies/subdir/copies-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.
diff --git a/third_party/python/gyp/test/generator-output/copies/subdir/file3 b/third_party/python/gyp/test/generator-output/copies/subdir/file3
new file mode 100644
index 0000000000..43f16f3522
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/copies/subdir/file3
@@ -0,0 +1 @@
+file3 contents
diff --git a/third_party/python/gyp/test/generator-output/copies/subdir/file4 b/third_party/python/gyp/test/generator-output/copies/subdir/file4
new file mode 100644
index 0000000000..5f7270a084
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/copies/subdir/file4
@@ -0,0 +1 @@
+file4 contents
diff --git a/third_party/python/gyp/test/generator-output/copies/subdir/subdir.gyp b/third_party/python/gyp/test/generator-output/copies/subdir/subdir.gyp
new file mode 100644
index 0000000000..af031d283a
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/copies/subdir/subdir.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.
+
+{
+ 'targets': [
+ {
+ 'target_name': 'copies3',
+ 'type': 'none',
+ 'copies': [
+ {
+ 'destination': 'copies-out',
+ 'files': [
+ 'file3',
+ ],
+ },
+ ],
+ },
+ {
+ 'target_name': 'copies4',
+ 'type': 'none',
+ 'copies': [
+ {
+ 'destination': '<(PRODUCT_DIR)/copies-out',
+ 'files': [
+ 'file4',
+ ],
+ },
+ ],
+ },
+ ],
+}
diff --git a/third_party/python/gyp/test/generator-output/gyptest-actions.py b/third_party/python/gyp/test/generator-output/gyptest-actions.py
new file mode 100755
index 0000000000..47121d0770
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/gyptest-actions.py
@@ -0,0 +1,57 @@
+#!/usr/bin/env python
+
+# 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.
+
+"""
+Verifies --generator-output= behavior when using actions.
+"""
+
+import TestGyp
+
+test = TestGyp.TestGyp()
+
+# All the generated files should go under 'gypfiles'. The source directory
+# ('actions') should be untouched.
+test.writable(test.workpath('actions'), False)
+test.run_gyp('actions.gyp',
+ '--generator-output=' + test.workpath('gypfiles'),
+ chdir='actions')
+
+test.writable(test.workpath('actions'), True)
+
+test.relocate('actions', 'relocate/actions')
+test.relocate('gypfiles', 'relocate/gypfiles')
+
+test.writable(test.workpath('relocate/actions'), False)
+
+# Some of the action outputs use "pure" relative paths (i.e. without prefixes
+# like <(INTERMEDIATE_DIR) or <(PROGRAM_DIR)). Even though we are building under
+# 'gypfiles', such outputs will still be created relative to the original .gyp
+# sources. Projects probably wouldn't normally do this, since it kind of defeats
+# the purpose of '--generator-output', but it is supported behaviour.
+test.writable(test.workpath('relocate/actions/build'), True)
+test.writable(test.workpath('relocate/actions/subdir1/build'), True)
+test.writable(test.workpath('relocate/actions/subdir1/actions-out'), True)
+test.writable(test.workpath('relocate/actions/subdir2/build'), True)
+test.writable(test.workpath('relocate/actions/subdir2/actions-out'), True)
+
+test.build('actions.gyp', test.ALL, chdir='relocate/gypfiles')
+
+expect = """\
+Hello from program.c
+Hello from make-prog1.py
+Hello from make-prog2.py
+"""
+
+if test.format == 'xcode':
+ chdir = 'relocate/actions/subdir1'
+else:
+ chdir = 'relocate/gypfiles'
+test.run_built_executable('program', chdir=chdir, stdout=expect)
+
+test.must_match('relocate/actions/subdir2/actions-out/file.out',
+ "Hello from make-file.py\n")
+
+test.pass_test()
diff --git a/third_party/python/gyp/test/generator-output/gyptest-copies.py b/third_party/python/gyp/test/generator-output/gyptest-copies.py
new file mode 100755
index 0000000000..262dfc30fa
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/gyptest-copies.py
@@ -0,0 +1,59 @@
+#!/usr/bin/env python
+
+# 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.
+
+"""
+Verifies file copies with --generator-output using an explicit build
+target of 'all'.
+"""
+
+import TestGyp
+
+test = TestGyp.TestGyp()
+
+test.writable(test.workpath('copies'), False)
+
+test.run_gyp('copies.gyp',
+ '--generator-output=' + test.workpath('gypfiles'),
+ '-G', 'xcode_ninja_target_pattern=^(?!copies_null)',
+ chdir='copies')
+
+test.writable(test.workpath('copies'), True)
+
+test.relocate('copies', 'relocate/copies')
+test.relocate('gypfiles', 'relocate/gypfiles')
+
+test.writable(test.workpath('relocate/copies'), False)
+
+test.writable(test.workpath('relocate/copies/build'), True)
+test.writable(test.workpath('relocate/copies/copies-out'), True)
+test.writable(test.workpath('relocate/copies/subdir/build'), True)
+test.writable(test.workpath('relocate/copies/subdir/copies-out'), True)
+
+test.build('copies.gyp', test.ALL, chdir='relocate/gypfiles')
+
+test.must_match(['relocate', 'copies', 'copies-out', 'file1'],
+ "file1 contents\n")
+
+if test.format == 'xcode':
+ chdir = 'relocate/copies/build'
+elif test.format in ['make', 'ninja', 'xcode-ninja', 'cmake']:
+ chdir = 'relocate/gypfiles/out'
+else:
+ chdir = 'relocate/gypfiles'
+test.must_match([chdir, 'Default', 'copies-out', 'file2'], "file2 contents\n")
+
+test.must_match(['relocate', 'copies', 'subdir', 'copies-out', 'file3'],
+ "file3 contents\n")
+
+if test.format == 'xcode':
+ chdir = 'relocate/copies/subdir/build'
+elif test.format in ['make', 'ninja', 'xcode-ninja', 'cmake']:
+ chdir = 'relocate/gypfiles/out'
+else:
+ chdir = 'relocate/gypfiles'
+test.must_match([chdir, 'Default', 'copies-out', 'file4'], "file4 contents\n")
+
+test.pass_test()
diff --git a/third_party/python/gyp/test/generator-output/gyptest-depth.py b/third_party/python/gyp/test/generator-output/gyptest-depth.py
new file mode 100755
index 0000000000..ee59a11f04
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/gyptest-depth.py
@@ -0,0 +1,58 @@
+#!/usr/bin/env python
+
+# Copyright 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.
+
+"""
+Verifies building a project hierarchy created when the --generator-output=
+and --depth= options is used to put the build configuration files in a separate
+directory tree.
+"""
+
+import TestGyp
+import os
+
+# This is a regression test for the make generator only.
+test = TestGyp.TestGyp(formats=['make'])
+
+test.writable(test.workpath('src'), False)
+
+toplevel_dir = os.path.basename(test.workpath())
+
+test.run_gyp(os.path.join(toplevel_dir, 'src', 'prog1.gyp'),
+ '-Dset_symroot=1',
+ '--generator-output=gypfiles',
+ depth=toplevel_dir,
+ chdir='..')
+
+test.writable(test.workpath('src/build'), True)
+test.writable(test.workpath('src/subdir2/build'), True)
+test.writable(test.workpath('src/subdir3/build'), True)
+
+test.build('prog1.gyp', test.ALL, chdir='gypfiles')
+
+chdir = 'gypfiles'
+
+expect = """\
+Hello from %s
+Hello from inc.h
+Hello from inc1/include1.h
+Hello from inc2/include2.h
+Hello from inc3/include3.h
+Hello from subdir2/deeper/deeper.h
+"""
+
+if test.format == 'xcode':
+ chdir = 'src'
+test.run_built_executable('prog1', chdir=chdir, stdout=expect % 'prog1.c')
+
+if test.format == 'xcode':
+ chdir = 'src/subdir2'
+test.run_built_executable('prog2', chdir=chdir, stdout=expect % 'prog2.c')
+
+if test.format == 'xcode':
+ chdir = 'src/subdir3'
+test.run_built_executable('prog3', chdir=chdir, stdout=expect % 'prog3.c')
+
+test.pass_test()
diff --git a/third_party/python/gyp/test/generator-output/gyptest-mac-bundle.py b/third_party/python/gyp/test/generator-output/gyptest-mac-bundle.py
new file mode 100644
index 0000000000..14597d8de2
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/gyptest-mac-bundle.py
@@ -0,0 +1,33 @@
+#!/usr/bin/env python
+
+# 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.
+
+"""
+Verifies mac bundles work with --generator-output.
+"""
+
+from __future__ import print_function
+
+import TestGyp
+
+import sys
+
+if sys.platform == 'darwin':
+ print("This test is currently disabled: https://crbug.com/483696.")
+ sys.exit(0)
+
+ test = TestGyp.TestGyp(formats=[])
+
+ MAC_BUNDLE_DIR = 'mac-bundle'
+ GYPFILES_DIR = 'gypfiles'
+ test.writable(test.workpath(MAC_BUNDLE_DIR), False)
+ test.run_gyp('test.gyp',
+ '--generator-output=' + test.workpath(GYPFILES_DIR),
+ chdir=MAC_BUNDLE_DIR)
+ test.writable(test.workpath(MAC_BUNDLE_DIR), True)
+
+ test.build('test.gyp', test.ALL, chdir=GYPFILES_DIR)
+
+ test.pass_test()
diff --git a/third_party/python/gyp/test/generator-output/gyptest-relocate.py b/third_party/python/gyp/test/generator-output/gyptest-relocate.py
new file mode 100755
index 0000000000..b867a6cffb
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/gyptest-relocate.py
@@ -0,0 +1,59 @@
+#!/usr/bin/env python
+
+# 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.
+
+"""
+Verifies that a project hierarchy created with the --generator-output=
+option can be built even when it's relocated to a different path.
+"""
+
+import TestGyp
+
+test = TestGyp.TestGyp()
+
+test.writable(test.workpath('src'), False)
+
+test.run_gyp('prog1.gyp',
+ '-Dset_symroot=1',
+ '--generator-output=' + test.workpath('gypfiles'),
+ chdir='src')
+
+test.writable(test.workpath('src'), True)
+
+test.relocate('src', 'relocate/src')
+test.relocate('gypfiles', 'relocate/gypfiles')
+
+test.writable(test.workpath('relocate/src'), False)
+
+test.writable(test.workpath('relocate/src/build'), True)
+test.writable(test.workpath('relocate/src/subdir2/build'), True)
+test.writable(test.workpath('relocate/src/subdir3/build'), True)
+
+test.build('prog1.gyp', test.ALL, chdir='relocate/gypfiles')
+
+chdir = 'relocate/gypfiles'
+
+expect = """\
+Hello from %s
+Hello from inc.h
+Hello from inc1/include1.h
+Hello from inc2/include2.h
+Hello from inc3/include3.h
+Hello from subdir2/deeper/deeper.h
+"""
+
+if test.format == 'xcode':
+ chdir = 'relocate/src'
+test.run_built_executable('prog1', chdir=chdir, stdout=expect % 'prog1.c')
+
+if test.format == 'xcode':
+ chdir = 'relocate/src/subdir2'
+test.run_built_executable('prog2', chdir=chdir, stdout=expect % 'prog2.c')
+
+if test.format == 'xcode':
+ chdir = 'relocate/src/subdir3'
+test.run_built_executable('prog3', chdir=chdir, stdout=expect % 'prog3.c')
+
+test.pass_test()
diff --git a/third_party/python/gyp/test/generator-output/gyptest-rules.py b/third_party/python/gyp/test/generator-output/gyptest-rules.py
new file mode 100755
index 0000000000..a3ff8bd858
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/gyptest-rules.py
@@ -0,0 +1,58 @@
+#!/usr/bin/env python
+
+# 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.
+
+"""
+Verifies --generator-output= behavior when using rules.
+"""
+
+import TestGyp
+
+test = TestGyp.TestGyp()
+
+test.writable(test.workpath('rules'), False)
+
+test.run_gyp('rules.gyp',
+ '--generator-output=' + test.workpath('gypfiles'),
+ chdir='rules')
+
+test.writable(test.workpath('rules'), True)
+
+test.relocate('rules', 'relocate/rules')
+test.relocate('gypfiles', 'relocate/gypfiles')
+
+test.writable(test.workpath('relocate/rules'), False)
+
+test.writable(test.workpath('relocate/rules/build'), True)
+test.writable(test.workpath('relocate/rules/subdir1/build'), True)
+test.writable(test.workpath('relocate/rules/subdir2/build'), True)
+test.writable(test.workpath('relocate/rules/subdir2/rules-out'), True)
+
+test.build('rules.gyp', test.ALL, chdir='relocate/gypfiles')
+
+expect = """\
+Hello from program.c
+Hello from function1.in1
+Hello from function2.in1
+Hello from define3.in0
+Hello from define4.in0
+"""
+
+if test.format == 'xcode':
+ chdir = 'relocate/rules/subdir1'
+else:
+ chdir = 'relocate/gypfiles'
+test.run_built_executable('program', chdir=chdir, stdout=expect)
+
+test.must_match('relocate/rules/subdir2/rules-out/file1.out',
+ "Hello from file1.in0\n")
+test.must_match('relocate/rules/subdir2/rules-out/file2.out',
+ "Hello from file2.in0\n")
+test.must_match('relocate/rules/subdir2/rules-out/file3.out',
+ "Hello from file3.in1\n")
+test.must_match('relocate/rules/subdir2/rules-out/file4.out',
+ "Hello from file4.in1\n")
+
+test.pass_test()
diff --git a/third_party/python/gyp/test/generator-output/gyptest-subdir2-deep.py b/third_party/python/gyp/test/generator-output/gyptest-subdir2-deep.py
new file mode 100755
index 0000000000..ec7862ddd9
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/gyptest-subdir2-deep.py
@@ -0,0 +1,36 @@
+#!/usr/bin/env python
+
+# 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.
+
+"""
+Verifies building a target from a .gyp file a few subdirectories
+deep when the --generator-output= option is used to put the build
+configuration files in a separate directory tree.
+"""
+
+import TestGyp
+
+test = TestGyp.TestGyp()
+
+test.writable(test.workpath('src'), False)
+
+test.writable(test.workpath('src/subdir2/deeper/build'), True)
+
+test.run_gyp('deeper.gyp',
+ '-Dset_symroot=1',
+ '--generator-output=' + test.workpath('gypfiles'),
+ chdir='src/subdir2/deeper')
+
+test.build('deeper.gyp', test.ALL, chdir='gypfiles')
+
+chdir = 'gypfiles'
+
+if test.format == 'xcode':
+ chdir = 'src/subdir2/deeper'
+test.run_built_executable('deeper',
+ chdir=chdir,
+ stdout="Hello from deeper.c\n")
+
+test.pass_test()
diff --git a/third_party/python/gyp/test/generator-output/gyptest-symlink.py b/third_party/python/gyp/test/generator-output/gyptest-symlink.py
new file mode 100755
index 0000000000..d7fe05830f
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/gyptest-symlink.py
@@ -0,0 +1,44 @@
+#!/usr/bin/env python
+
+# 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.
+
+"""
+Verifies building a target when the --generator-output= option is used to put
+the build configuration files in a separate directory tree referenced by a
+symlink.
+"""
+
+import TestGyp
+import os
+import sys
+
+test = TestGyp.TestGyp()
+if not hasattr(os, 'symlink') or sys.platform == 'win32':
+ # Python3 on windows has symlink but it doesn't work reliably.
+ test.skip_test('Missing or bad os.symlink -- skipping test.\n')
+
+test.writable(test.workpath('src'), False)
+
+test.writable(test.workpath('src/subdir2/deeper/build'), True)
+
+test.subdir(test.workpath('build'))
+test.subdir(test.workpath('build/deeper'))
+test.symlink('build/deeper', test.workpath('symlink'))
+
+test.writable(test.workpath('build/deeper'), True)
+test.run_gyp('deeper.gyp',
+ '-Dset_symroot=2',
+ '--generator-output=' + test.workpath('symlink'),
+ chdir='src/subdir2/deeper')
+
+chdir = 'symlink'
+test.build('deeper.gyp', test.ALL, chdir=chdir)
+
+if test.format == 'xcode':
+ chdir = 'src/subdir2/deeper'
+test.run_built_executable('deeper',
+ chdir=chdir,
+ stdout="Hello from deeper.c\n")
+test.pass_test()
diff --git a/third_party/python/gyp/test/generator-output/gyptest-top-all.py b/third_party/python/gyp/test/generator-output/gyptest-top-all.py
new file mode 100755
index 0000000000..b1776776ea
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/gyptest-top-all.py
@@ -0,0 +1,53 @@
+#!/usr/bin/env python
+
+# 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.
+
+"""
+Verifies building a project hierarchy created when the --generator-output=
+option is used to put the build configuration files in a separate
+directory tree.
+"""
+
+import TestGyp
+
+test = TestGyp.TestGyp()
+
+test.writable(test.workpath('src'), False)
+
+test.run_gyp('prog1.gyp',
+ '-Dset_symroot=1',
+ '--generator-output=' + test.workpath('gypfiles'),
+ chdir='src')
+
+test.writable(test.workpath('src/build'), True)
+test.writable(test.workpath('src/subdir2/build'), True)
+test.writable(test.workpath('src/subdir3/build'), True)
+
+test.build('prog1.gyp', test.ALL, chdir='gypfiles')
+
+chdir = 'gypfiles'
+
+expect = """\
+Hello from %s
+Hello from inc.h
+Hello from inc1/include1.h
+Hello from inc2/include2.h
+Hello from inc3/include3.h
+Hello from subdir2/deeper/deeper.h
+"""
+
+if test.format == 'xcode':
+ chdir = 'src'
+test.run_built_executable('prog1', chdir=chdir, stdout=expect % 'prog1.c')
+
+if test.format == 'xcode':
+ chdir = 'src/subdir2'
+test.run_built_executable('prog2', chdir=chdir, stdout=expect % 'prog2.c')
+
+if test.format == 'xcode':
+ chdir = 'src/subdir3'
+test.run_built_executable('prog3', chdir=chdir, stdout=expect % 'prog3.c')
+
+test.pass_test()
diff --git a/third_party/python/gyp/test/generator-output/mac-bundle/Info.plist b/third_party/python/gyp/test/generator-output/mac-bundle/Info.plist
new file mode 100644
index 0000000000..8cb142e9f5
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/mac-bundle/Info.plist
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIconFile</key>
+ <string></string>
+ <key>CFBundleIdentifier</key>
+ <string>com.google.${PRODUCT_NAME}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>ause</string>
+ <key>CFBundleVersion</key>
+ <string>1</string>
+ <key>LSMinimumSystemVersion</key>
+ <string>${MACOSX_DEPLOYMENT_TARGET}</string>
+ <key>NSMainNibFile</key>
+ <string>MainMenu</string>
+ <key>NSPrincipalClass</key>
+ <string>NSApplication</string>
+</dict>
+</plist>
diff --git a/third_party/python/gyp/test/generator-output/mac-bundle/app.order b/third_party/python/gyp/test/generator-output/mac-bundle/app.order
new file mode 100644
index 0000000000..4eb9e89d39
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/mac-bundle/app.order
@@ -0,0 +1 @@
+_main
diff --git a/third_party/python/gyp/test/generator-output/mac-bundle/header.h b/third_party/python/gyp/test/generator-output/mac-bundle/header.h
new file mode 100644
index 0000000000..7ed7775122
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/mac-bundle/header.h
@@ -0,0 +1 @@
+int f();
diff --git a/third_party/python/gyp/test/generator-output/mac-bundle/main.c b/third_party/python/gyp/test/generator-output/mac-bundle/main.c
new file mode 100644
index 0000000000..237c8ce181
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/mac-bundle/main.c
@@ -0,0 +1 @@
+int main() {}
diff --git a/third_party/python/gyp/test/generator-output/mac-bundle/resource.sb b/third_party/python/gyp/test/generator-output/mac-bundle/resource.sb
new file mode 100644
index 0000000000..731befc457
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/mac-bundle/resource.sb
@@ -0,0 +1 @@
+A text file.
diff --git a/third_party/python/gyp/test/generator-output/mac-bundle/test.gyp b/third_party/python/gyp/test/generator-output/mac-bundle/test.gyp
new file mode 100644
index 0000000000..35ac674f6d
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/mac-bundle/test.gyp
@@ -0,0 +1,25 @@
+# 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.
+{
+ 'targets': [
+ {
+ 'target_name': 'test_app',
+ 'product_name': 'Test App Gyp',
+ 'type': 'executable',
+ 'mac_bundle': 1,
+ 'sources': [
+ 'main.c',
+ ],
+ 'mac_bundle_resources': [
+ 'resource.sb',
+ ],
+ 'xcode_settings': {
+ 'INFOPLIST_FILE': 'Info.plist',
+ 'ORDER_FILE': 'app.order',
+ 'GCC_PREFIX_HEADER': 'header.h',
+ 'GCC_PRECOMPILE_PREFIX_HEADER': 'YES',
+ },
+ },
+ ],
+}
diff --git a/third_party/python/gyp/test/generator-output/rules/build/README.txt b/third_party/python/gyp/test/generator-output/rules/build/README.txt
new file mode 100644
index 0000000000..1b052c9a24
--- /dev/null
+++ b/third_party/python/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/third_party/python/gyp/test/generator-output/rules/copy-file.py b/third_party/python/gyp/test/generator-output/rules/copy-file.py
new file mode 100755
index 0000000000..80c6749f93
--- /dev/null
+++ b/third_party/python/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], 'w').write(contents)
+
+sys.exit(0)
diff --git a/third_party/python/gyp/test/generator-output/rules/rules.gyp b/third_party/python/gyp/test/generator-output/rules/rules.gyp
new file mode 100644
index 0000000000..dded59aff3
--- /dev/null
+++ b/third_party/python/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/third_party/python/gyp/test/generator-output/rules/subdir1/build/README.txt b/third_party/python/gyp/test/generator-output/rules/subdir1/build/README.txt
new file mode 100644
index 0000000000..1b052c9a24
--- /dev/null
+++ b/third_party/python/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/third_party/python/gyp/test/generator-output/rules/subdir1/define3.in0 b/third_party/python/gyp/test/generator-output/rules/subdir1/define3.in0
new file mode 100644
index 0000000000..cc29c643f3
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/rules/subdir1/define3.in0
@@ -0,0 +1 @@
+#define STRING3 "Hello from define3.in0\n"
diff --git a/third_party/python/gyp/test/generator-output/rules/subdir1/define4.in0 b/third_party/python/gyp/test/generator-output/rules/subdir1/define4.in0
new file mode 100644
index 0000000000..c9b0467b32
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/rules/subdir1/define4.in0
@@ -0,0 +1 @@
+#define STRING4 "Hello from define4.in0\n"
diff --git a/third_party/python/gyp/test/generator-output/rules/subdir1/executable.gyp b/third_party/python/gyp/test/generator-output/rules/subdir1/executable.gyp
new file mode 100644
index 0000000000..42bee4d746
--- /dev/null
+++ b/third_party/python/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/third_party/python/gyp/test/generator-output/rules/subdir1/function1.in1 b/third_party/python/gyp/test/generator-output/rules/subdir1/function1.in1
new file mode 100644
index 0000000000..545e7ca16b
--- /dev/null
+++ b/third_party/python/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/third_party/python/gyp/test/generator-output/rules/subdir1/function2.in1 b/third_party/python/gyp/test/generator-output/rules/subdir1/function2.in1
new file mode 100644
index 0000000000..6bad43f9cf
--- /dev/null
+++ b/third_party/python/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/third_party/python/gyp/test/generator-output/rules/subdir1/program.c b/third_party/python/gyp/test/generator-output/rules/subdir1/program.c
new file mode 100644
index 0000000000..56b320632a
--- /dev/null
+++ b/third_party/python/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/third_party/python/gyp/test/generator-output/rules/subdir2/build/README.txt b/third_party/python/gyp/test/generator-output/rules/subdir2/build/README.txt
new file mode 100644
index 0000000000..1b052c9a24
--- /dev/null
+++ b/third_party/python/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/third_party/python/gyp/test/generator-output/rules/subdir2/file1.in0 b/third_party/python/gyp/test/generator-output/rules/subdir2/file1.in0
new file mode 100644
index 0000000000..7aca64f4ce
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/rules/subdir2/file1.in0
@@ -0,0 +1 @@
+Hello from file1.in0
diff --git a/third_party/python/gyp/test/generator-output/rules/subdir2/file2.in0 b/third_party/python/gyp/test/generator-output/rules/subdir2/file2.in0
new file mode 100644
index 0000000000..80a281a2a9
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/rules/subdir2/file2.in0
@@ -0,0 +1 @@
+Hello from file2.in0
diff --git a/third_party/python/gyp/test/generator-output/rules/subdir2/file3.in1 b/third_party/python/gyp/test/generator-output/rules/subdir2/file3.in1
new file mode 100644
index 0000000000..60ae2e7931
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/rules/subdir2/file3.in1
@@ -0,0 +1 @@
+Hello from file3.in1
diff --git a/third_party/python/gyp/test/generator-output/rules/subdir2/file4.in1 b/third_party/python/gyp/test/generator-output/rules/subdir2/file4.in1
new file mode 100644
index 0000000000..5a3c30720e
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/rules/subdir2/file4.in1
@@ -0,0 +1 @@
+Hello from file4.in1
diff --git a/third_party/python/gyp/test/generator-output/rules/subdir2/none.gyp b/third_party/python/gyp/test/generator-output/rules/subdir2/none.gyp
new file mode 100644
index 0000000000..664cbd9cb7
--- /dev/null
+++ b/third_party/python/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/third_party/python/gyp/test/generator-output/rules/subdir2/rules-out/README.txt b/third_party/python/gyp/test/generator-output/rules/subdir2/rules-out/README.txt
new file mode 100644
index 0000000000..1b052c9a24
--- /dev/null
+++ b/third_party/python/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.
diff --git a/third_party/python/gyp/test/generator-output/src/build/README.txt b/third_party/python/gyp/test/generator-output/src/build/README.txt
new file mode 100644
index 0000000000..90ef886193
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/src/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/third_party/python/gyp/test/generator-output/src/inc.h b/third_party/python/gyp/test/generator-output/src/inc.h
new file mode 100644
index 0000000000..57aa1a5a74
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/src/inc.h
@@ -0,0 +1 @@
+#define INC_STRING "inc.h"
diff --git a/third_party/python/gyp/test/generator-output/src/inc1/include1.h b/third_party/python/gyp/test/generator-output/src/inc1/include1.h
new file mode 100644
index 0000000000..1d59065fc9
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/src/inc1/include1.h
@@ -0,0 +1 @@
+#define INCLUDE1_STRING "inc1/include1.h"
diff --git a/third_party/python/gyp/test/generator-output/src/prog1.c b/third_party/python/gyp/test/generator-output/src/prog1.c
new file mode 100644
index 0000000000..bf7c2a17bd
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/src/prog1.c
@@ -0,0 +1,18 @@
+#include <stdio.h>
+
+#include "inc.h"
+#include "include1.h"
+#include "include2.h"
+#include "include3.h"
+#include "deeper.h"
+
+int main(void)
+{
+ printf("Hello from prog1.c\n");
+ printf("Hello from %s\n", INC_STRING);
+ printf("Hello from %s\n", INCLUDE1_STRING);
+ printf("Hello from %s\n", INCLUDE2_STRING);
+ printf("Hello from %s\n", INCLUDE3_STRING);
+ printf("Hello from %s\n", DEEPER_STRING);
+ return 0;
+}
diff --git a/third_party/python/gyp/test/generator-output/src/prog1.gyp b/third_party/python/gyp/test/generator-output/src/prog1.gyp
new file mode 100644
index 0000000000..d50e6fb0a7
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/src/prog1.gyp
@@ -0,0 +1,28 @@
+# 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.
+
+{
+ 'includes': [
+ 'symroot.gypi',
+ ],
+ 'targets': [
+ {
+ 'target_name': 'prog1',
+ 'type': 'executable',
+ 'dependencies': [
+ 'subdir2/prog2.gyp:prog2',
+ ],
+ 'include_dirs': [
+ '.',
+ 'inc1',
+ 'subdir2/inc2',
+ 'subdir3/inc3',
+ 'subdir2/deeper',
+ ],
+ 'sources': [
+ 'prog1.c',
+ ],
+ },
+ ],
+}
diff --git a/third_party/python/gyp/test/generator-output/src/subdir2/build/README.txt b/third_party/python/gyp/test/generator-output/src/subdir2/build/README.txt
new file mode 100644
index 0000000000..90ef886193
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/src/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/third_party/python/gyp/test/generator-output/src/subdir2/deeper/build/README.txt b/third_party/python/gyp/test/generator-output/src/subdir2/deeper/build/README.txt
new file mode 100644
index 0000000000..90ef886193
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/src/subdir2/deeper/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/third_party/python/gyp/test/generator-output/src/subdir2/deeper/deeper.c b/third_party/python/gyp/test/generator-output/src/subdir2/deeper/deeper.c
new file mode 100644
index 0000000000..843505cd11
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/src/subdir2/deeper/deeper.c
@@ -0,0 +1,7 @@
+#include <stdio.h>
+
+int main(void)
+{
+ printf("Hello from deeper.c\n");
+ return 0;
+}
diff --git a/third_party/python/gyp/test/generator-output/src/subdir2/deeper/deeper.gyp b/third_party/python/gyp/test/generator-output/src/subdir2/deeper/deeper.gyp
new file mode 100644
index 0000000000..8648770872
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/src/subdir2/deeper/deeper.gyp
@@ -0,0 +1,18 @@
+# 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.
+
+{
+ 'includes': [
+ '../../symroot.gypi',
+ ],
+ 'targets': [
+ {
+ 'target_name': 'deeper',
+ 'type': 'executable',
+ 'sources': [
+ 'deeper.c',
+ ],
+ },
+ ],
+}
diff --git a/third_party/python/gyp/test/generator-output/src/subdir2/deeper/deeper.h b/third_party/python/gyp/test/generator-output/src/subdir2/deeper/deeper.h
new file mode 100644
index 0000000000..f6484a0fe5
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/src/subdir2/deeper/deeper.h
@@ -0,0 +1 @@
+#define DEEPER_STRING "subdir2/deeper/deeper.h"
diff --git a/third_party/python/gyp/test/generator-output/src/subdir2/inc2/include2.h b/third_party/python/gyp/test/generator-output/src/subdir2/inc2/include2.h
new file mode 100644
index 0000000000..1ccfa5dea7
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/src/subdir2/inc2/include2.h
@@ -0,0 +1 @@
+#define INCLUDE2_STRING "inc2/include2.h"
diff --git a/third_party/python/gyp/test/generator-output/src/subdir2/prog2.c b/third_party/python/gyp/test/generator-output/src/subdir2/prog2.c
new file mode 100644
index 0000000000..d80d871984
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/src/subdir2/prog2.c
@@ -0,0 +1,18 @@
+#include <stdio.h>
+
+#include "inc.h"
+#include "include1.h"
+#include "include2.h"
+#include "include3.h"
+#include "deeper.h"
+
+int main(void)
+{
+ printf("Hello from prog2.c\n");
+ printf("Hello from %s\n", INC_STRING);
+ printf("Hello from %s\n", INCLUDE1_STRING);
+ printf("Hello from %s\n", INCLUDE2_STRING);
+ printf("Hello from %s\n", INCLUDE3_STRING);
+ printf("Hello from %s\n", DEEPER_STRING);
+ return 0;
+}
diff --git a/third_party/python/gyp/test/generator-output/src/subdir2/prog2.gyp b/third_party/python/gyp/test/generator-output/src/subdir2/prog2.gyp
new file mode 100644
index 0000000000..7176ed8be7
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/src/subdir2/prog2.gyp
@@ -0,0 +1,28 @@
+# 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.
+
+{
+ 'includes': [
+ '../symroot.gypi',
+ ],
+ 'targets': [
+ {
+ 'target_name': 'prog2',
+ 'type': 'executable',
+ 'include_dirs': [
+ '..',
+ '../inc1',
+ 'inc2',
+ '../subdir3/inc3',
+ 'deeper',
+ ],
+ 'dependencies': [
+ '../subdir3/prog3.gyp:prog3',
+ ],
+ 'sources': [
+ 'prog2.c',
+ ],
+ },
+ ],
+}
diff --git a/third_party/python/gyp/test/generator-output/src/subdir3/build/README.txt b/third_party/python/gyp/test/generator-output/src/subdir3/build/README.txt
new file mode 100644
index 0000000000..90ef886193
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/src/subdir3/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/third_party/python/gyp/test/generator-output/src/subdir3/inc3/include3.h b/third_party/python/gyp/test/generator-output/src/subdir3/inc3/include3.h
new file mode 100644
index 0000000000..bf53bf1f00
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/src/subdir3/inc3/include3.h
@@ -0,0 +1 @@
+#define INCLUDE3_STRING "inc3/include3.h"
diff --git a/third_party/python/gyp/test/generator-output/src/subdir3/prog3.c b/third_party/python/gyp/test/generator-output/src/subdir3/prog3.c
new file mode 100644
index 0000000000..c72233da19
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/src/subdir3/prog3.c
@@ -0,0 +1,18 @@
+#include <stdio.h>
+
+#include "inc.h"
+#include "include1.h"
+#include "include2.h"
+#include "include3.h"
+#include "deeper.h"
+
+int main(void)
+{
+ printf("Hello from prog3.c\n");
+ printf("Hello from %s\n", INC_STRING);
+ printf("Hello from %s\n", INCLUDE1_STRING);
+ printf("Hello from %s\n", INCLUDE2_STRING);
+ printf("Hello from %s\n", INCLUDE3_STRING);
+ printf("Hello from %s\n", DEEPER_STRING);
+ return 0;
+}
diff --git a/third_party/python/gyp/test/generator-output/src/subdir3/prog3.gyp b/third_party/python/gyp/test/generator-output/src/subdir3/prog3.gyp
new file mode 100644
index 0000000000..46c5e000a2
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/src/subdir3/prog3.gyp
@@ -0,0 +1,25 @@
+# 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.
+
+{
+ 'includes': [
+ '../symroot.gypi',
+ ],
+ 'targets': [
+ {
+ 'target_name': 'prog3',
+ 'type': 'executable',
+ 'include_dirs': [
+ '..',
+ '../inc1',
+ '../subdir2/inc2',
+ 'inc3',
+ '../subdir2/deeper',
+ ],
+ 'sources': [
+ 'prog3.c',
+ ],
+ },
+ ],
+}
diff --git a/third_party/python/gyp/test/generator-output/src/symroot.gypi b/third_party/python/gyp/test/generator-output/src/symroot.gypi
new file mode 100644
index 0000000000..519916427c
--- /dev/null
+++ b/third_party/python/gyp/test/generator-output/src/symroot.gypi
@@ -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.
+
+{
+ 'variables': {
+ 'set_symroot%': 0,
+ },
+ 'conditions': [
+ ['set_symroot == 1', {
+ 'xcode_settings': {
+ 'SYMROOT': '<(DEPTH)/build',
+ },
+ }],
+ ],
+}