Index: pylib/gyp/generator/make.py |
diff --git a/pylib/gyp/generator/make.py b/pylib/gyp/generator/make.py |
index d60e8949e956132e04999199ae3b68321d755d03..d855c06bb22eeb5c7c8d213a2f6eb6a1c69d0552 100644 |
--- a/pylib/gyp/generator/make.py |
+++ b/pylib/gyp/generator/make.py |
@@ -1205,12 +1205,11 @@ $(obj).$(TOOLSET)/$(TARGET)/%%.o: $(obj)/%%%s FORCE_DO_CMD |
self.WriteLn('quiet_cmd_%s = ACTION %s $@' % (name, name)) |
if len(dirs) > 0: |
command = 'mkdir -p %s' % ' '.join(dirs) + '; ' + command |
+ |
+ cd_action = 'cd %s; ' % Sourceify(self.path or '.') |
+ |
# Set LD_LIBRARY_PATH in case the action runs an executable from this |
# build which links to shared libs from this build. |
- if self.path: |
- cd_action = 'cd %s; ' % Sourceify(self.path) |
- else: |
- cd_action = '' |
# actions run on the host, so they should in theory only use host |
# libraries, but until everything is made cross-compile safe, also use |
# target libraries. |
@@ -1316,10 +1315,7 @@ $(obj).$(TOOLSET)/$(TARGET)/%%.o: $(obj)/%%%s FORCE_DO_CMD |
mkdirs = '' |
if len(dirs) > 0: |
mkdirs = 'mkdir -p %s; ' % ' '.join(dirs) |
- if self.path: |
- cd_action = 'cd %s; ' % Sourceify(self.path) |
- else: |
- cd_action = '' |
+ cd_action = 'cd %s; ' % Sourceify(self.path or '.') |
# Set LD_LIBRARY_PATH in case the rule runs an executable from this |
# build which links to shared libs from this build. |
# rules run on the host, so they should in theory only use host |