Permalink
Browse files

gyp: upgrade to r1197

  • Loading branch information...
1 parent 3f43b1c commit 62ac960002b0a5f93172663b76d3b71ec37940be @bnoordhuis bnoordhuis committed Feb 13, 2012
Showing with 3,664 additions and 1,496 deletions.
  1. +1 −42 tools/gyp/buildbot/buildbot_run.py
  2. +28 −1 tools/gyp/pylib/gyp/common.py
  3. +4 −4 tools/gyp/pylib/gyp/generator/dump_dependency_json.py
  4. +173 −976 tools/gyp/pylib/gyp/generator/make.py
  5. +59 −42 tools/gyp/pylib/gyp/generator/msvs.py
  6. +538 −199 tools/gyp/pylib/gyp/generator/ninja.py
  7. +20 −0 tools/gyp/pylib/gyp/input.py
  8. +77 −67 tools/gyp/pylib/gyp/mac_tool.py
  9. +33 −31 tools/gyp/pylib/gyp/ninja_syntax.py
  10. +0 −15 tools/gyp/pylib/gyp/system_test.py
  11. +956 −0 tools/gyp/pylib/gyp/xcode_emulation.py
  12. +3 −3 tools/gyp/test/home_dot_gyp/gyptest-home-includes-regyp.py
  13. +2 −2 tools/gyp/test/home_dot_gyp/gyptest-home-includes.py
  14. +10 −19 tools/gyp/test/lib/TestGyp.py
  15. +34 −0 tools/gyp/test/mac/action-envvars/action/action.gyp
  16. +8 −0 tools/gyp/test/mac/action-envvars/action/action.sh
  17. +1 −0 tools/gyp/test/mac/copy-dylib/empty.c
  18. +31 −0 tools/gyp/test/mac/copy-dylib/test.gyp
  19. +1 −0 tools/gyp/test/mac/depend-on-bundle/English.lproj/InfoPlist.strings
  20. +28 −0 tools/gyp/test/mac/depend-on-bundle/Info.plist
  21. +1 −0 tools/gyp/test/mac/depend-on-bundle/bundle.c
  22. +4 −0 tools/gyp/test/mac/depend-on-bundle/executable.c
  23. +28 −0 tools/gyp/test/mac/depend-on-bundle/test.gyp
  24. +11 −0 tools/gyp/test/mac/global-settings/src/dir1/dir1.gyp
  25. +22 −0 tools/gyp/test/mac/global-settings/src/dir2/dir2.gyp
  26. +1 −0 tools/gyp/test/mac/global-settings/src/dir2/file.txt
  27. +30 −0 tools/gyp/test/mac/gyptest-action-envvars.py
  28. +2 −2 tools/gyp/test/mac/gyptest-app.py
  29. +2 −2 tools/gyp/test/mac/gyptest-copies.py
  30. +25 −0 tools/gyp/test/mac/gyptest-copy-dylib.py
  31. +1 −1 tools/gyp/test/mac/gyptest-debuginfo.py
  32. +40 −0 tools/gyp/test/mac/gyptest-depend-on-bundle.py
  33. +2 −2 tools/gyp/test/mac/gyptest-framework.py
  34. +26 −0 tools/gyp/test/mac/gyptest-global-settings.py
  35. +2 −2 tools/gyp/test/mac/gyptest-infoplist-process.py
  36. +22 −0 tools/gyp/test/mac/gyptest-libraries.py
  37. +2 −2 tools/gyp/test/mac/gyptest-loadable-module.py
  38. +33 −0 tools/gyp/test/mac/gyptest-non-strs-flattened-to-env.py
  39. +62 −0 tools/gyp/test/mac/gyptest-postbuild-copy-bundle.py
  40. +29 −0 tools/gyp/test/mac/gyptest-postbuild-defaults.py
  41. +3 −1 tools/gyp/test/mac/gyptest-postbuild-fail.py
  42. +26 −0 tools/gyp/test/mac/gyptest-postbuild-multiple-configurations.py
  43. +28 −0 tools/gyp/test/mac/gyptest-postbuild-static-library.gyp
  44. +1 −1 tools/gyp/test/mac/gyptest-postbuild.py
  45. +2 −2 tools/gyp/test/mac/gyptest-prefixheader.py
  46. +21 −8 tools/gyp/test/mac/gyptest-rebuild.py
  47. +46 −0 tools/gyp/test/mac/gyptest-sourceless-module.gyp
  48. +1 −1 tools/gyp/test/mac/gyptest-strip.py
  49. +2 −2 tools/gyp/test/mac/gyptest-type-envvars.py
  50. +53 −6 tools/gyp/test/mac/gyptest-xcode-env-order.py
  51. +1 −0 tools/gyp/test/mac/libraries/subdir/README.txt
  52. +10 −0 tools/gyp/test/mac/libraries/subdir/hello.cc
  53. +7 −0 tools/gyp/test/mac/libraries/subdir/mylib.c
  54. +66 −0 tools/gyp/test/mac/libraries/subdir/test.gyp
  55. +15 −0 tools/gyp/test/mac/non-strs-flattened-to-env/Info.plist
  56. +7 −0 tools/gyp/test/mac/non-strs-flattened-to-env/main.c
  57. +24 −0 tools/gyp/test/mac/non-strs-flattened-to-env/test.gyp
  58. +30 −0 tools/gyp/test/mac/postbuild-copy-bundle/Framework-Info.plist
  59. +32 −0 tools/gyp/test/mac/postbuild-copy-bundle/TestApp-Info.plist
  60. 0 tools/gyp/test/mac/postbuild-copy-bundle/empty.c
  61. +4 −0 tools/gyp/test/mac/postbuild-copy-bundle/main.c
  62. +9 −0 tools/gyp/test/mac/postbuild-copy-bundle/postbuild-copy-framework.sh
  63. +1 −0 tools/gyp/test/mac/postbuild-copy-bundle/resource_file.sb
  64. +43 −0 tools/gyp/test/mac/postbuild-copy-bundle/test.gyp
  65. +13 −0 tools/gyp/test/mac/postbuild-defaults/Info.plist
  66. +7 −0 tools/gyp/test/mac/postbuild-defaults/main.c
  67. +15 −0 tools/gyp/test/mac/postbuild-defaults/postbuild-defaults.sh
  68. +26 −0 tools/gyp/test/mac/postbuild-defaults/test.gyp
  69. +1 −1 tools/gyp/test/mac/postbuild-fail/postbuild-fail.sh
  70. +4 −0 tools/gyp/test/mac/postbuild-multiple-configurations/main.c
  71. +7 −0 tools/gyp/test/mac/postbuild-multiple-configurations/postbuild-touch-file.sh
  72. +26 −0 tools/gyp/test/mac/postbuild-multiple-configurations/test.gyp
  73. +4 −0 tools/gyp/test/mac/postbuild-static-library/empty.c
  74. +7 −0 tools/gyp/test/mac/postbuild-static-library/postbuild-touch-file.sh
  75. +34 −0 tools/gyp/test/mac/postbuild-static-library/test.gyp
  76. +1 −0 tools/gyp/test/mac/prefixheader/file.cc
  77. +1 −0 tools/gyp/test/mac/prefixheader/file.m
  78. +1 −0 tools/gyp/test/mac/prefixheader/file.mm
  79. +59 −2 tools/gyp/test/mac/prefixheader/test.gyp
  80. +32 −0 tools/gyp/test/mac/rebuild/TestApp-Info.plist
  81. +6 −0 tools/gyp/test/mac/rebuild/delay-touch.sh
  82. 0 tools/gyp/test/mac/rebuild/empty.c
  83. +1 −0 tools/gyp/test/mac/rebuild/main.c
  84. +56 −0 tools/gyp/test/mac/rebuild/test.gyp
  85. +1 −0 tools/gyp/test/mac/sourceless-module/empty.c
  86. +39 −0 tools/gyp/test/mac/sourceless-module/test.gyp
  87. +11 −0 tools/gyp/test/mac/type_envvars/test.gyp
  88. +7 −1 tools/gyp/test/mac/type_envvars/test_bundle_executable.sh
  89. +8 −1 tools/gyp/test/mac/type_envvars/test_bundle_loadable_module.sh
  90. +8 −1 tools/gyp/test/mac/type_envvars/test_bundle_shared_library.sh
  91. +7 −1 tools/gyp/test/mac/type_envvars/test_nonbundle_executable.sh
  92. +7 −1 tools/gyp/test/mac/type_envvars/test_nonbundle_loadable_module.sh
  93. +16 −0 tools/gyp/test/mac/type_envvars/test_nonbundle_none.sh
  94. +7 −1 tools/gyp/test/mac/type_envvars/test_nonbundle_shared_library.sh
  95. +7 −1 tools/gyp/test/mac/type_envvars/test_nonbundle_static_library.sh
  96. +24 −6 tools/gyp/test/mac/xcode-env-order/Info.plist
  97. +64 −4 tools/gyp/test/mac/xcode-env-order/test.gyp
  98. +51 −0 tools/gyp/test/msvs/list_excluded/gyptest-all.py
  99. +10 −0 tools/gyp/test/msvs/list_excluded/hello.cpp
  100. +19 −0 tools/gyp/test/msvs/list_excluded/hello_exclude.gyp
  101. +10 −0 tools/gyp/test/msvs/list_excluded/hello_mac.cpp
  102. +20 −0 tools/gyp/test/msvs/uldi2010/gyptest-all.py
  103. +13 −0 tools/gyp/test/msvs/uldi2010/hello.c
  104. +26 −0 tools/gyp/test/msvs/uldi2010/hello.gyp
  105. +10 −0 tools/gyp/test/msvs/uldi2010/hello2.c
  106. +52 −0 tools/gyp/test/ninja/chained-dependency/chained-dependency.gyp
  107. +5 −0 tools/gyp/test/ninja/chained-dependency/chained.c
  108. +23 −0 tools/gyp/test/ninja/chained-dependency/gyptest-chained-dependency.py
  109. +31 −0 tools/gyp/test/restat/gyptest-restat.py
  110. +17 −0 tools/gyp/test/restat/src/create_intermediate.py
  111. +48 −0 tools/gyp/test/restat/src/restat.gyp
  112. +2 −2 tools/gyp/test/same-gyp-name/gyptest-all.py
  113. +2 −2 tools/gyp/test/same-gyp-name/gyptest-default.py
  114. +0 −18 tools/gyp/test/settings/gyptest-settings.py
  115. +0 −20 tools/gyp/test/settings/settings.gyp
  116. +1 −1 tools/gyp/test/toplevel-dir/gyptest-toplevel-dir.py
  117. +2 −0 tools/gyp/test/variables/commands/commands.gyp
  118. +14 −0 tools/gyp/test/variables/commands/commands.gyp.ignore-env.stdout
  119. +14 −0 tools/gyp/test/variables/commands/commands.gyp.stdout
  120. +2 −0 tools/gyp/test/variables/commands/commands.gypd.golden
  121. +1 −0 tools/gyp/test/variables/commands/test.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-# Copyright (c) 2011 Google Inc. All rights reserved.
+# 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.
@@ -23,32 +23,6 @@
TRUNK_DIR = os.path.dirname(BUILDBOT_DIR)
ROOT_DIR = os.path.dirname(TRUNK_DIR)
OUT_DIR = os.path.join(TRUNK_DIR, 'out')
-NINJA_PATH = os.path.join(TRUNK_DIR, 'ninja' + EXE_SUFFIX)
-NINJA_WORK_DIR = os.path.join(ROOT_DIR, 'ninja_work')
-
-
-def InstallNinja():
- """Install + build ninja.
-
- Returns:
- 0 for success, 1 for failure.
- """
- print '@@@BUILD_STEP install ninja@@@'
- # Delete old version if any.
- try:
- shutil.rmtree(NINJA_WORK_DIR, ignore_errors=True)
- except:
- pass
- # Sync new copy from git.
- subprocess.check_call(
- 'git clone https://github.com/martine/ninja.git ' + NINJA_WORK_DIR,
- shell=True)
- # Bootstrap.
- subprocess.check_call('./bootstrap.sh', cwd=NINJA_WORK_DIR, shell=True)
- # Copy out ninja.
- shutil.copyfile(os.path.join(NINJA_WORK_DIR, 'ninja' + EXE_SUFFIX),
- NINJA_PATH)
- os.chmod(NINJA_PATH, 0777)
def GypTestFormat(title, format=None, msvs_version=None):
@@ -64,17 +38,6 @@ def GypTestFormat(title, format=None, msvs_version=None):
if not format:
format = title
- # Install ninja if needed.
- # NOTE: as ninja gets installed each time, regressions to ninja can come
- # either from changes to ninja itself, or changes to gyp.
- if format == 'ninja':
- try:
- InstallNinja()
- except Exception, e:
- print '@@@STEP_FAILURE@@@'
- print str(e)
- return 1
-
print '@@@BUILD_STEP ' + title + '@@@'
sys.stdout.flush()
env = os.environ.copy()
@@ -104,10 +67,6 @@ def GypBuild():
print '@@@BUILD_STEP cleanup@@@'
print 'Removing %s...' % OUT_DIR
shutil.rmtree(OUT_DIR, ignore_errors=True)
- print 'Removing %s...' % NINJA_WORK_DIR
- shutil.rmtree(NINJA_WORK_DIR, ignore_errors=True)
- print 'Removing %s...' % NINJA_PATH
- shutil.rmtree(NINJA_PATH, ignore_errors=True)
print 'Done.'
retcode = 0
@@ -1,7 +1,9 @@
-# Copyright (c) 2011 Google Inc. All rights reserved.
+# 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.
+from __future__ import with_statement
+
import errno
import filecmp
import os.path
@@ -347,6 +349,8 @@ def close(self):
def GetFlavor(params):
"""Returns |params.flavor| if it's set, the system's default flavor else."""
flavors = {
+ 'cygwin': 'win',
+ 'win32': 'win',
'darwin': 'mac',
'sunos5': 'solaris',
'freebsd7': 'freebsd',
@@ -356,6 +360,29 @@ def GetFlavor(params):
return params.get('flavor', flavor)
+def CopyTool(flavor, out_path):
+ """Finds (mac|sun)_tool.gyp in the gyp directory and copies it
+ to |out_path|."""
+ prefix = { 'solaris': 'sun', 'mac': 'mac' }.get(flavor, None)
+ if not prefix:
+ return
+
+ # Slurp input file.
+ source_path = os.path.join(
+ os.path.dirname(os.path.abspath(__file__)), '%s_tool.py' % prefix)
+ with open(source_path) as source_file:
+ source = source_file.readlines()
+
+ # Add header and write it out.
+ tool_path = os.path.join(out_path, 'gyp-%s-tool' % prefix)
+ with open(tool_path, 'w') as tool_file:
+ tool_file.write(
+ ''.join([source[0], '# Generated by gyp. Do not edit.\n'] + source[1:]))
+
+ # Make file executable.
+ os.chmod(tool_path, 0755)
+
+
# From Alex Martelli,
# http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52560
# ASPN: Python Cookbook: Remove duplicates from a sequence
@@ -20,15 +20,15 @@
'RULE_INPUT_DIRNAME', 'RULE_INPUT_EXT',
'EXECUTABLE_PREFIX', 'EXECUTABLE_SUFFIX',
'STATIC_LIB_PREFIX', 'STATIC_LIB_SUFFIX',
- 'SHARED_LIB_PREFIX', 'SHARED_LIB_SUFFIX',
- 'LINKER_SUPPORTS_ICF']:
+ 'SHARED_LIB_PREFIX', 'SHARED_LIB_SUFFIX']:
generator_default_variables[unused] = ''
def CalculateVariables(default_variables, params):
generator_flags = params.get('generator_flags', {})
- default_variables['OS'] = generator_flags.get(
- 'os', gyp.common.GetFlavor(params))
+ for key, val in generator_flags.items():
+ default_variables.setdefault(key, val)
+ default_variables.setdefault('OS', gyp.common.GetFlavor(params))
def CalculateGeneratorInputInfo(params):
Oops, something went wrong.

0 comments on commit 62ac960

Please sign in to comment.