@@ -31,6 +31,8 @@
|
31 | 31 | from gyp.common import GetEnvironFallback |
32 | 32 | from gyp.common import GypError |
33 | 33 | |
| 34 | +import hashlib |
| 35 | + |
34 | 36 | generator_default_variables = { |
35 | 37 | 'EXECUTABLE_PREFIX': '', |
36 | 38 | 'EXECUTABLE_SUFFIX': '', |
@@ -1743,7 +1745,10 @@ def WriteMakeRule(self, outputs, inputs, actions=None, comment=None,
|
1743 | 1745 | # actual command. |
1744 | 1746 | # - The intermediate recipe will 'touch' the intermediate file. |
1745 | 1747 | # - The multi-output rule will have an do-nothing recipe. |
1746 | | -intermediate = "%s.intermediate" % (command if command else self.target) |
| 1748 | + |
| 1749 | +# Hash the target name to avoid generating overlong filenames. |
| 1750 | +cmddigest = hashlib.sha1(command if command else self.target).hexdigest() |
| 1751 | +intermediate = "%s.intermediate" % cmddigest |
1747 | 1752 | self.WriteLn('%s: %s' % (' '.join(outputs), intermediate)) |
1748 | 1753 | self.WriteLn('\t%s' % '@:'); |
1749 | 1754 | self.WriteLn('%s: %s' % ('.INTERMEDIATE', intermediate)) |
|