summaryrefslogtreecommitdiff
path: root/tools/gyp/pylib
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2011-12-16 14:06:29 -0800
committerRyan Dahl <ry@tinyclouds.org>2011-12-16 14:06:29 -0800
commit64de69c1a4d2befb1be19aaf35028c1c833cdee3 (patch)
treee9fe9508cfb4a36681d475d628fe4e2285bed395 /tools/gyp/pylib
parent1865b11dcb77b452ef84fac6970cc742b387dfab (diff)
downloadnode-new-64de69c1a4d2befb1be19aaf35028c1c833cdee3.tar.gz
Upgrade GYP to r1107
Diffstat (limited to 'tools/gyp/pylib')
-rw-r--r--tools/gyp/pylib/gyp/common.py3
-rw-r--r--tools/gyp/pylib/gyp/generator/make.py38
2 files changed, 24 insertions, 17 deletions
diff --git a/tools/gyp/pylib/gyp/common.py b/tools/gyp/pylib/gyp/common.py
index b5a6e82049..b44b0956f7 100644
--- a/tools/gyp/pylib/gyp/common.py
+++ b/tools/gyp/pylib/gyp/common.py
@@ -76,6 +76,9 @@ def ResolveTarget(build_file, target, toolset):
# and os.path.join will return it as-is.
build_file = os.path.normpath(os.path.join(os.path.dirname(build_file),
parsed_build_file))
+ # Further (to handle cases like ../cwd), make it relative to cwd)
+ if not os.path.isabs(build_file):
+ build_file = RelativePath(build_file, '.')
else:
build_file = parsed_build_file
diff --git a/tools/gyp/pylib/gyp/generator/make.py b/tools/gyp/pylib/gyp/generator/make.py
index 3971360618..31c016e4c8 100644
--- a/tools/gyp/pylib/gyp/generator/make.py
+++ b/tools/gyp/pylib/gyp/generator/make.py
@@ -2015,6 +2015,27 @@ $(obj).$(TOOLSET)/$(TARGET)/%%.o: $(obj)/%%%s FORCE_DO_CMD
order_only = True,
multiple_output_trick = False)
+ if self.flavor == 'mac':
+ # Write an envvar for postbuilds.
+ # CHROMIUM_STRIP_SAVE_FILE is a chromium-specific hack.
+ # TODO(thakis): It would be nice to have some general mechanism instead.
+ # This variable may be referenced by TARGET_POSTBUILDS_$(BUILDTYPE),
+ # so we must output its definition first, since we declare variables
+ # using ":=".
+ # TODO(thakis): Write this only for targets that actually have
+ # postbuilds.
+ strip_save_file = self.xcode_settings.GetPerTargetSetting(
+ 'CHROMIUM_STRIP_SAVE_FILE')
+ if strip_save_file:
+ strip_save_file = self.Absolutify(strip_save_file)
+ else:
+ # Explicitly clear this out, else a postbuild might pick up an export
+ # from an earlier target.
+ strip_save_file = ''
+ self.WriteXcodeEnv(
+ self.output, spec,
+ additional_settings={'CHROMIUM_STRIP_SAVE_FILE': strip_save_file})
+
has_target_postbuilds = False
if self.type != 'none':
for configname in sorted(configs.keys()):
@@ -2078,23 +2099,6 @@ $(obj).$(TOOLSET)/$(TARGET)/%%.o: $(obj)/%%%s FORCE_DO_CMD
postbuilds.append(gyp.common.EncodePOSIXShellList(shell_list))
if postbuilds:
- # Write envvars for postbuilds.
- extra_settings = {}
-
- # CHROMIUM_STRIP_SAVE_FILE is a chromium-specific hack.
- # TODO(thakis): It would be nice to have some general mechanism instead.
- strip_save_file = self.xcode_settings.GetPerTargetSetting(
- 'CHROMIUM_STRIP_SAVE_FILE')
- if strip_save_file:
- strip_save_file = self.Absolutify(strip_save_file)
- else:
- # Explicitly clear this out, else a postbuild might pick up an export
- # from an earlier target.
- strip_save_file = ''
- extra_settings['CHROMIUM_STRIP_SAVE_FILE'] = strip_save_file
-
- self.WriteXcodeEnv(self.output, spec, additional_settings=extra_settings)
-
for i in xrange(len(postbuilds)):
if not postbuilds[i].startswith('$'):
postbuilds[i] = EscapeShellArgument(postbuilds[i])