summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/Source/ThirdParty/gyp
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/webkit/Source/ThirdParty/gyp')
-rwxr-xr-xsrc/3rdparty/webkit/Source/ThirdParty/gyp/gyp.bat10
-rw-r--r--src/3rdparty/webkit/Source/ThirdParty/gyp/samples/samples.bat10
-rw-r--r--src/3rdparty/webkit/Source/ThirdParty/gyp/test/actions/gyptest-errors.py40
-rw-r--r--src/3rdparty/webkit/Source/ThirdParty/gyp/test/actions/src/subdir1/program.c24
-rw-r--r--src/3rdparty/webkit/Source/ThirdParty/gyp/test/generator-output/actions/subdir1/actions-out/README.txt8
-rw-r--r--src/3rdparty/webkit/Source/ThirdParty/gyp/test/generator-output/actions/subdir1/program.c24
-rw-r--r--src/3rdparty/webkit/Source/ThirdParty/gyp/test/generator-output/actions/subdir2/actions-out/README.txt8
-rw-r--r--src/3rdparty/webkit/Source/ThirdParty/gyp/test/generator-output/rules/subdir2/rules-out/README.txt8
-rw-r--r--src/3rdparty/webkit/Source/ThirdParty/gyp/tools/pretty_gyp.py284
9 files changed, 208 insertions, 208 deletions
diff --git a/src/3rdparty/webkit/Source/ThirdParty/gyp/gyp.bat b/src/3rdparty/webkit/Source/ThirdParty/gyp/gyp.bat
index 91ebf1e..90fbc6d 100755
--- a/src/3rdparty/webkit/Source/ThirdParty/gyp/gyp.bat
+++ b/src/3rdparty/webkit/Source/ThirdParty/gyp/gyp.bat
@@ -1,5 +1,5 @@
-@rem Copyright (c) 2009 Google Inc. All rights reserved.
-@rem Use of this source code is governed by a BSD-style license that can be
-@rem found in the LICENSE file.
-
-@python "%~dp0/gyp" %*
+@rem Copyright (c) 2009 Google Inc. All rights reserved.
+@rem Use of this source code is governed by a BSD-style license that can be
+@rem found in the LICENSE file.
+
+@python "%~dp0/gyp" %*
diff --git a/src/3rdparty/webkit/Source/ThirdParty/gyp/samples/samples.bat b/src/3rdparty/webkit/Source/ThirdParty/gyp/samples/samples.bat
index 5683255..778d9c9 100644
--- a/src/3rdparty/webkit/Source/ThirdParty/gyp/samples/samples.bat
+++ b/src/3rdparty/webkit/Source/ThirdParty/gyp/samples/samples.bat
@@ -1,5 +1,5 @@
-@rem Copyright (c) 2009 Google Inc. All rights reserved.
-@rem Use of this source code is governed by a BSD-style license that can be
-@rem found in the LICENSE file.
-
-@python %~dp0/samples %*
+@rem Copyright (c) 2009 Google Inc. All rights reserved.
+@rem Use of this source code is governed by a BSD-style license that can be
+@rem found in the LICENSE file.
+
+@python %~dp0/samples %*
diff --git a/src/3rdparty/webkit/Source/ThirdParty/gyp/test/actions/gyptest-errors.py b/src/3rdparty/webkit/Source/ThirdParty/gyp/test/actions/gyptest-errors.py
index 4a2aa07..ca41487 100644
--- a/src/3rdparty/webkit/Source/ThirdParty/gyp/test/actions/gyptest-errors.py
+++ b/src/3rdparty/webkit/Source/ThirdParty/gyp/test/actions/gyptest-errors.py
@@ -1,24 +1,24 @@
-#!/usr/bin/env python
+#!/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.
-
-"""
-Verifies behavior for different action configuration errors:
-exit status of 1, and the expected error message must be in stderr.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-
-test.run_gyp('action_missing_name.gyp', chdir='src', status=1, stderr=None)
-expect = [
- "Anonymous action in target broken_actions2. An action must have an 'action_name' field.",
-]
-test.must_contain_all_lines(test.stderr(), expect)
-
-
-test.pass_test()
+
+"""
+Verifies behavior for different action configuration errors:
+exit status of 1, and the expected error message must be in stderr.
+"""
+
+import TestGyp
+
+test = TestGyp.TestGyp()
+
+
+test.run_gyp('action_missing_name.gyp', chdir='src', status=1, stderr=None)
+expect = [
+ "Anonymous action in target broken_actions2. An action must have an 'action_name' field.",
+]
+test.must_contain_all_lines(test.stderr(), expect)
+
+
+test.pass_test()
diff --git a/src/3rdparty/webkit/Source/ThirdParty/gyp/test/actions/src/subdir1/program.c b/src/3rdparty/webkit/Source/ThirdParty/gyp/test/actions/src/subdir1/program.c
index f155939..d5f661d 100644
--- a/src/3rdparty/webkit/Source/ThirdParty/gyp/test/actions/src/subdir1/program.c
+++ b/src/3rdparty/webkit/Source/ThirdParty/gyp/test/actions/src/subdir1/program.c
@@ -1,12 +1,12 @@
-#include <stdio.h>
-
-extern void prog1(void);
-extern void prog2(void);
-
-int main(int argc, char *argv[])
-{
- printf("Hello from program.c\n");
- prog1();
- prog2();
- return 0;
-}
+#include <stdio.h>
+
+extern void prog1(void);
+extern void prog2(void);
+
+int main(int argc, char *argv[])
+{
+ printf("Hello from program.c\n");
+ prog1();
+ prog2();
+ return 0;
+}
diff --git a/src/3rdparty/webkit/Source/ThirdParty/gyp/test/generator-output/actions/subdir1/actions-out/README.txt b/src/3rdparty/webkit/Source/ThirdParty/gyp/test/generator-output/actions/subdir1/actions-out/README.txt
index 90ef886..1b052c9 100644
--- a/src/3rdparty/webkit/Source/ThirdParty/gyp/test/generator-output/actions/subdir1/actions-out/README.txt
+++ b/src/3rdparty/webkit/Source/ThirdParty/gyp/test/generator-output/actions/subdir1/actions-out/README.txt
@@ -1,4 +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.
+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/src/3rdparty/webkit/Source/ThirdParty/gyp/test/generator-output/actions/subdir1/program.c b/src/3rdparty/webkit/Source/ThirdParty/gyp/test/generator-output/actions/subdir1/program.c
index f155939..d5f661d 100644
--- a/src/3rdparty/webkit/Source/ThirdParty/gyp/test/generator-output/actions/subdir1/program.c
+++ b/src/3rdparty/webkit/Source/ThirdParty/gyp/test/generator-output/actions/subdir1/program.c
@@ -1,12 +1,12 @@
-#include <stdio.h>
-
-extern void prog1(void);
-extern void prog2(void);
-
-int main(int argc, char *argv[])
-{
- printf("Hello from program.c\n");
- prog1();
- prog2();
- return 0;
-}
+#include <stdio.h>
+
+extern void prog1(void);
+extern void prog2(void);
+
+int main(int argc, char *argv[])
+{
+ printf("Hello from program.c\n");
+ prog1();
+ prog2();
+ return 0;
+}
diff --git a/src/3rdparty/webkit/Source/ThirdParty/gyp/test/generator-output/actions/subdir2/actions-out/README.txt b/src/3rdparty/webkit/Source/ThirdParty/gyp/test/generator-output/actions/subdir2/actions-out/README.txt
index 90ef886..1b052c9 100644
--- a/src/3rdparty/webkit/Source/ThirdParty/gyp/test/generator-output/actions/subdir2/actions-out/README.txt
+++ b/src/3rdparty/webkit/Source/ThirdParty/gyp/test/generator-output/actions/subdir2/actions-out/README.txt
@@ -1,4 +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.
+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/src/3rdparty/webkit/Source/ThirdParty/gyp/test/generator-output/rules/subdir2/rules-out/README.txt b/src/3rdparty/webkit/Source/ThirdParty/gyp/test/generator-output/rules/subdir2/rules-out/README.txt
index 90ef886..1b052c9 100644
--- a/src/3rdparty/webkit/Source/ThirdParty/gyp/test/generator-output/rules/subdir2/rules-out/README.txt
+++ b/src/3rdparty/webkit/Source/ThirdParty/gyp/test/generator-output/rules/subdir2/rules-out/README.txt
@@ -1,4 +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.
+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/src/3rdparty/webkit/Source/ThirdParty/gyp/tools/pretty_gyp.py b/src/3rdparty/webkit/Source/ThirdParty/gyp/tools/pretty_gyp.py
index 128c2e3..04c7901 100644
--- a/src/3rdparty/webkit/Source/ThirdParty/gyp/tools/pretty_gyp.py
+++ b/src/3rdparty/webkit/Source/ThirdParty/gyp/tools/pretty_gyp.py
@@ -1,142 +1,142 @@
-#!/usr/bin/env python
-# Copyright (c) 2009 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-# This file pretty-prints the contents of a GYP file.
-
-import sys
-import re
-
-input = []
-if len(sys.argv) > 1:
- input_file = open(sys.argv[1])
- input = input_file.read().splitlines()
- input_file.close()
-else:
- input = sys.stdin.read().splitlines()
-
-# This is used to remove comments when we're counting braces.
-comment_re = re.compile(r'\s*#.*')
-
-# This is used to remove quoted strings when we're counting braces.
-# It takes into account quoted quotes, and makes sure that the quotes
-# match.
-# NOTE: It does not handle quotes that span more than one line, or
-# cases where an escaped quote is preceeded by an escaped backslash.
-quote_re_str = r'(?P<q>[\'"])(.*?)(?<![^\\][\\])(?P=q)'
-quote_re = re.compile(quote_re_str)
-
-def comment_replace(matchobj):
- return matchobj.group(1) + matchobj.group(2) + '#' * len(matchobj.group(3))
-
-def mask_comments(input):
- # This is used to mask the quoted strings so we skip braces inside
- # quoted strings.
- search_re = re.compile(r'(.*?)(#)(.*)')
- return [search_re.sub(comment_replace, line) for line in input]
-
-def quote_replace(matchobj):
- return "%s%s%s%s" % (matchobj.group(1),
- matchobj.group(2),
- 'x'*len(matchobj.group(3)),
- matchobj.group(2))
-
-def mask_quotes(input):
- # This is used to mask the quoted strings so we skip braces inside
- # quoted strings.
- search_re = re.compile(r'(.*?)' + quote_re_str)
- return [search_re.sub(quote_replace, line) for line in input]
-
-def do_split(input, masked_input, search_re):
- output = []
- mask_output = []
- for (line, masked_line) in zip(input, masked_input):
- m = search_re.match(masked_line)
- while m:
- split = len(m.group(1))
- line = line[:split] + r'\n' + line[split:]
- masked_line = masked_line[:split] + r'\n' + masked_line[split:]
- m = search_re.match(masked_line)
- output.extend(line.split(r'\n'))
- mask_output.extend(masked_line.split(r'\n'))
- return (output, mask_output)
-
-# This masks out the quotes and comments, and then splits appropriate
-# lines (lines that matche the double_*_brace re's above) before
-# indenting them below.
-def split_double_braces(input):
- # These are used to split lines which have multiple braces on them, so
- # that the indentation looks prettier when all laid out (e.g. closing
- # braces make a nice diagonal line).
- double_open_brace_re = re.compile(r'(.*?[\[\{\(,])(\s*)([\[\{\(])')
- double_close_brace_re = re.compile(r'(.*?[\]\}\)],?)(\s*)([\]\}\)])')
-
- masked_input = mask_quotes(input)
- masked_input = mask_comments(masked_input)
-
- (output, mask_output) = do_split(input, masked_input, double_open_brace_re)
- (output, mask_output) = do_split(output, mask_output, double_close_brace_re)
-
- return output
-
-# This keeps track of the number of braces on a given line and returns
-# the result. It starts at zero and subtracts for closed braces, and
-# adds for open braces.
-def count_braces(line):
- open_braces = ['[', '(', '{']
- close_braces = [']', ')', '}']
- closing_prefix_re = re.compile(r'(.*?[^\s\]\}\)]+.*?)([\]\}\)],?)\s*$')
- cnt = 0
- stripline = comment_re.sub(r'', line)
- stripline = quote_re.sub(r"''", stripline)
- for char in stripline:
- for brace in open_braces:
- if char == brace:
- cnt += 1
- for brace in close_braces:
- if char == brace:
- cnt -= 1
-
- after = False
- if cnt > 0:
- after = True
-
- # This catches the special case of a closing brace having something
- # other than just whitespace ahead of it -- we don't want to
- # unindent that until after this line is printed so it stays with
- # the previous indentation level.
- if cnt < 0 and closing_prefix_re.match(stripline):
- after = True
- return (cnt, after)
-
-# This does the main work of indenting the input based on the brace counts.
-def prettyprint_input(lines):
- indent = 0
- basic_offset = 2
- last_line = ""
- for line in lines:
- if comment_re.match(line):
- print line
- else:
- line = line.strip('\r\n\t ') # Otherwise doesn't strip \r on Unix.
- if len(line) > 0:
- (brace_diff, after) = count_braces(line)
- if brace_diff != 0:
- if after:
- print " " * (basic_offset * indent) + line
- indent += brace_diff
- else:
- indent += brace_diff
- print " " * (basic_offset * indent) + line
- else:
- print " " * (basic_offset * indent) + line
- else:
- print ""
- last_line = line
-
-# Split up the double braces.
-lines = split_double_braces(input)
-
-# Indent and print the output.
-prettyprint_input(lines)
+#!/usr/bin/env python
+# Copyright (c) 2009 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# This file pretty-prints the contents of a GYP file.
+
+import sys
+import re
+
+input = []
+if len(sys.argv) > 1:
+ input_file = open(sys.argv[1])
+ input = input_file.read().splitlines()
+ input_file.close()
+else:
+ input = sys.stdin.read().splitlines()
+
+# This is used to remove comments when we're counting braces.
+comment_re = re.compile(r'\s*#.*')
+
+# This is used to remove quoted strings when we're counting braces.
+# It takes into account quoted quotes, and makes sure that the quotes
+# match.
+# NOTE: It does not handle quotes that span more than one line, or
+# cases where an escaped quote is preceeded by an escaped backslash.
+quote_re_str = r'(?P<q>[\'"])(.*?)(?<![^\\][\\])(?P=q)'
+quote_re = re.compile(quote_re_str)
+
+def comment_replace(matchobj):
+ return matchobj.group(1) + matchobj.group(2) + '#' * len(matchobj.group(3))
+
+def mask_comments(input):
+ # This is used to mask the quoted strings so we skip braces inside
+ # quoted strings.
+ search_re = re.compile(r'(.*?)(#)(.*)')
+ return [search_re.sub(comment_replace, line) for line in input]
+
+def quote_replace(matchobj):
+ return "%s%s%s%s" % (matchobj.group(1),
+ matchobj.group(2),
+ 'x'*len(matchobj.group(3)),
+ matchobj.group(2))
+
+def mask_quotes(input):
+ # This is used to mask the quoted strings so we skip braces inside
+ # quoted strings.
+ search_re = re.compile(r'(.*?)' + quote_re_str)
+ return [search_re.sub(quote_replace, line) for line in input]
+
+def do_split(input, masked_input, search_re):
+ output = []
+ mask_output = []
+ for (line, masked_line) in zip(input, masked_input):
+ m = search_re.match(masked_line)
+ while m:
+ split = len(m.group(1))
+ line = line[:split] + r'\n' + line[split:]
+ masked_line = masked_line[:split] + r'\n' + masked_line[split:]
+ m = search_re.match(masked_line)
+ output.extend(line.split(r'\n'))
+ mask_output.extend(masked_line.split(r'\n'))
+ return (output, mask_output)
+
+# This masks out the quotes and comments, and then splits appropriate
+# lines (lines that matche the double_*_brace re's above) before
+# indenting them below.
+def split_double_braces(input):
+ # These are used to split lines which have multiple braces on them, so
+ # that the indentation looks prettier when all laid out (e.g. closing
+ # braces make a nice diagonal line).
+ double_open_brace_re = re.compile(r'(.*?[\[\{\(,])(\s*)([\[\{\(])')
+ double_close_brace_re = re.compile(r'(.*?[\]\}\)],?)(\s*)([\]\}\)])')
+
+ masked_input = mask_quotes(input)
+ masked_input = mask_comments(masked_input)
+
+ (output, mask_output) = do_split(input, masked_input, double_open_brace_re)
+ (output, mask_output) = do_split(output, mask_output, double_close_brace_re)
+
+ return output
+
+# This keeps track of the number of braces on a given line and returns
+# the result. It starts at zero and subtracts for closed braces, and
+# adds for open braces.
+def count_braces(line):
+ open_braces = ['[', '(', '{']
+ close_braces = [']', ')', '}']
+ closing_prefix_re = re.compile(r'(.*?[^\s\]\}\)]+.*?)([\]\}\)],?)\s*$')
+ cnt = 0
+ stripline = comment_re.sub(r'', line)
+ stripline = quote_re.sub(r"''", stripline)
+ for char in stripline:
+ for brace in open_braces:
+ if char == brace:
+ cnt += 1
+ for brace in close_braces:
+ if char == brace:
+ cnt -= 1
+
+ after = False
+ if cnt > 0:
+ after = True
+
+ # This catches the special case of a closing brace having something
+ # other than just whitespace ahead of it -- we don't want to
+ # unindent that until after this line is printed so it stays with
+ # the previous indentation level.
+ if cnt < 0 and closing_prefix_re.match(stripline):
+ after = True
+ return (cnt, after)
+
+# This does the main work of indenting the input based on the brace counts.
+def prettyprint_input(lines):
+ indent = 0
+ basic_offset = 2
+ last_line = ""
+ for line in lines:
+ if comment_re.match(line):
+ print line
+ else:
+ line = line.strip('\r\n\t ') # Otherwise doesn't strip \r on Unix.
+ if len(line) > 0:
+ (brace_diff, after) = count_braces(line)
+ if brace_diff != 0:
+ if after:
+ print " " * (basic_offset * indent) + line
+ indent += brace_diff
+ else:
+ indent += brace_diff
+ print " " * (basic_offset * indent) + line
+ else:
+ print " " * (basic_offset * indent) + line
+ else:
+ print ""
+ last_line = line
+
+# Split up the double braces.
+lines = split_double_braces(input)
+
+# Indent and print the output.
+prettyprint_input(lines)