@@ -929,7 +929,7 @@ def WriteActions(self, actions, extra_sources, extra_outputs,
929929 '%s%s'
930930 % (name , cd_action , command ))
931931 self .WriteLn ()
932- outputs = map ( self .Absolutify , outputs )
932+ outputs = [ self .Absolutify ( o ) for o in outputs ]
933933 # The makefile rules are all relative to the top dir, but the gyp actions
934934 # are defined relative to their containing dir. This replaces the obj
935935 # 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,
10191019 outputs = [gyp .xcode_emulation .ExpandEnvVars (o , env ) for o in outputs ]
10201020 inputs = [gyp .xcode_emulation .ExpandEnvVars (i , env ) for i in inputs ]
10211021
1022- outputs = map ( self .Absolutify , outputs )
1022+ outputs = [ self .Absolutify ( o ) for o in outputs ]
10231023 all_outputs += outputs
10241024 # Only write the 'obj' and 'builddir' rules for the "primary" output
10251025 # (:1); it's superfluous for the "extra outputs", and this avoids
@@ -1725,8 +1725,8 @@ def WriteMakeRule(self, outputs, inputs, actions=None, comment=None,
17251725 output is just a name to run the rule
17261726 command: (optional) command name to generate unambiguous labels
17271727 """
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 ]
17301730
17311731 if comment :
17321732 self .WriteLn ('# ' + comment )
@@ -1755,7 +1755,7 @@ def WriteMakeRule(self, outputs, inputs, actions=None, comment=None,
17551755 # - The multi-output rule will have an do-nothing recipe.
17561756
17571757 # 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 ()
17591759 intermediate = "%s.intermediate" % (cmddigest )
17601760 self .WriteLn ('%s: %s' % (' ' .join (outputs ), intermediate ))
17611761 self .WriteLn ('\t %s' % '@:' )
0 commit comments