@@ -929,7 +929,7 @@ def WriteActions(self, actions, extra_sources, extra_outputs,
929
929
'%s%s'
930
930
% (name , cd_action , command ))
931
931
self .WriteLn ()
932
- outputs = map ( self .Absolutify , outputs )
932
+ outputs = [ self .Absolutify ( o ) for o in outputs ]
933
933
# The makefile rules are all relative to the top dir, but the gyp actions
934
934
# are defined relative to their containing dir. This replaces the obj
935
935
# variable for the action rule with an absolute version so that the output
@@ -1019,7 +1019,7 @@ def WriteRules(self, rules, extra_sources, extra_outputs,
1019
1019
outputs = [gyp .xcode_emulation .ExpandEnvVars (o , env ) for o in outputs ]
1020
1020
inputs = [gyp .xcode_emulation .ExpandEnvVars (i , env ) for i in inputs ]
1021
1021
1022
- outputs = map ( self .Absolutify , outputs )
1022
+ outputs = [ self .Absolutify ( o ) for o in outputs ]
1023
1023
all_outputs += outputs
1024
1024
# Only write the 'obj' and 'builddir' rules for the "primary" output
1025
1025
# (:1); it's superfluous for the "extra outputs", and this avoids
@@ -1725,8 +1725,8 @@ def WriteMakeRule(self, outputs, inputs, actions=None, comment=None,
1725
1725
output is just a name to run the rule
1726
1726
command: (optional) command name to generate unambiguous labels
1727
1727
"""
1728
- outputs = map ( QuoteSpaces , outputs )
1729
- inputs = map ( QuoteSpaces , inputs )
1728
+ outputs = [ QuoteSpaces ( o ) for o in outputs ]
1729
+ inputs = [ QuoteSpaces ( i ) for i in inputs ]
1730
1730
1731
1731
if comment :
1732
1732
self .WriteLn ('# ' + comment )
@@ -1755,7 +1755,7 @@ def WriteMakeRule(self, outputs, inputs, actions=None, comment=None,
1755
1755
# - The multi-output rule will have an do-nothing recipe.
1756
1756
1757
1757
# Hash the target name to avoid generating overlong filenames.
1758
- cmddigest = hashlib .sha1 (command if command else self .target ).hexdigest ()
1758
+ cmddigest = hashlib .sha1 (( command or self .target ). encode ( "utf-8" ) ).hexdigest ()
1759
1759
intermediate = "%s.intermediate" % (cmddigest )
1760
1760
self .WriteLn ('%s: %s' % (' ' .join (outputs ), intermediate ))
1761
1761
self .WriteLn ('\t %s' % '@:' )
0 commit comments