Index: pylib/gyp/generator/make.py |
diff --git a/pylib/gyp/generator/make.py b/pylib/gyp/generator/make.py |
index b7da768fb33f5a8e12ec6ffa4c20e2fc6c1434e8..0db84292047bab4aa4003e055567216e6c6f78ff 100644 |
--- a/pylib/gyp/generator/make.py |
+++ b/pylib/gyp/generator/make.py |
@@ -31,6 +31,8 @@ import gyp.xcode_emulation |
from gyp.common import GetEnvironFallback |
from gyp.common import GypError |
+import hashlib |
+ |
generator_default_variables = { |
'EXECUTABLE_PREFIX': '', |
'EXECUTABLE_SUFFIX': '', |
@@ -1743,7 +1745,10 @@ $(obj).$(TOOLSET)/$(TARGET)/%%.o: $(obj)/%%%s FORCE_DO_CMD |
# actual command. |
# - The intermediate recipe will 'touch' the intermediate file. |
# - The multi-output rule will have an do-nothing recipe. |
- intermediate = "%s.intermediate" % (command if command else self.target) |
+ |
+ # Hash the target name to avoid generating overlong filenames. |
+ cmddigest = hashlib.sha1(command if command else self.target).hexdigest() |
+ intermediate = "%s.intermediate" % (cmddigest) |
Nico
2016/10/13 13:25:11
(nit: no need for the parens here)
|
self.WriteLn('%s: %s' % (' '.join(outputs), intermediate)) |
self.WriteLn('\t%s' % '@:'); |
self.WriteLn('%s: %s' % ('.INTERMEDIATE', intermediate)) |