@@ -821,7 +821,7 @@ def Write(self, qualified_target, base_path, output_filename, spec, configs,
821
821
gyp .xcode_emulation .MacPrefixHeader (
822
822
self .xcode_settings , lambda p : Sourceify (self .Absolutify (p )),
823
823
self .Pchify ))
824
- sources = filter (Compilable , all_sources )
824
+ sources = list ( filter (Compilable , all_sources ) )
825
825
if sources :
826
826
self .WriteLn (SHARED_HEADER_SUFFIX_RULES_COMMENT1 )
827
827
extensions = set ([os .path .splitext (s )[1 ] for s in sources ])
@@ -950,7 +950,7 @@ def WriteActions(self, actions, extra_sources, extra_outputs,
950
950
'%s%s'
951
951
% (name , cd_action , command ))
952
952
self .WriteLn ()
953
- outputs = map ( self .Absolutify , outputs )
953
+ outputs = [ self .Absolutify ( output ) for output in outputs ]
954
954
# The makefile rules are all relative to the top dir, but the gyp actions
955
955
# are defined relative to their containing dir. This replaces the obj
956
956
# variable for the action rule with an absolute version so that the output
@@ -974,7 +974,7 @@ def WriteActions(self, actions, extra_sources, extra_outputs,
974
974
outputs = [gyp .xcode_emulation .ExpandEnvVars (o , env ) for o in outputs ]
975
975
inputs = [gyp .xcode_emulation .ExpandEnvVars (i , env ) for i in inputs ]
976
976
977
- self .WriteDoCmd (outputs , map ( Sourceify , map (self .Absolutify , inputs )) ,
977
+ self .WriteDoCmd (outputs , [ Sourceify (self .Absolutify ( i )) for i in inputs ] ,
978
978
part_of_all = part_of_all , command = name )
979
979
980
980
# Stuff the outputs in a variable so we can refer to them later.
@@ -1023,8 +1023,8 @@ def WriteRules(self, rules, extra_sources, extra_outputs,
1023
1023
extra_sources += outputs
1024
1024
if int (rule .get ('process_outputs_as_mac_bundle_resources' , False )):
1025
1025
extra_mac_bundle_resources += outputs
1026
- inputs = map ( Sourceify , map (self .Absolutify , [ rule_source ] +
1027
- rule .get ('inputs' , [])))
1026
+ inputs = [ Sourceify (self .Absolutify ( i )) for i
1027
+ in [ rule_source ] + rule .get ('inputs' , [])]
1028
1028
actions = ['$(call do_cmd,%s_%d)' % (name , count )]
1029
1029
1030
1030
if name == 'resources_grit' :
@@ -1040,7 +1040,7 @@ def WriteRules(self, rules, extra_sources, extra_outputs,
1040
1040
outputs = [gyp .xcode_emulation .ExpandEnvVars (o , env ) for o in outputs ]
1041
1041
inputs = [gyp .xcode_emulation .ExpandEnvVars (i , env ) for i in inputs ]
1042
1042
1043
- outputs = map ( self .Absolutify , outputs )
1043
+ outputs = [ self .Absolutify ( output ) for output in outputs ]
1044
1044
all_outputs += outputs
1045
1045
# Only write the 'obj' and 'builddir' rules for the "primary" output
1046
1046
# (:1); it's superfluous for the "extra outputs", and this avoids
@@ -1147,7 +1147,7 @@ def WriteCopies(self, copies, extra_outputs, part_of_all):
1147
1147
path = gyp .xcode_emulation .ExpandEnvVars (path , env )
1148
1148
self .WriteDoCmd ([output ], [path ], 'copy' , part_of_all )
1149
1149
outputs .append (output )
1150
- self .WriteLn ('%s = %s' % (variable , ' ' .join (map ( QuoteSpaces , outputs ) )))
1150
+ self .WriteLn ('%s = %s' % (variable , ' ' .join (QuoteSpaces ( o ) for o in outputs )))
1151
1151
extra_outputs .append ('$(%s)' % variable )
1152
1152
self .WriteLn ()
1153
1153
@@ -1158,7 +1158,7 @@ def WriteMacBundleResources(self, resources, bundle_deps):
1158
1158
1159
1159
for output , res in gyp .xcode_emulation .GetMacBundleResources (
1160
1160
generator_default_variables ['PRODUCT_DIR' ], self .xcode_settings ,
1161
- map ( Sourceify , map (self .Absolutify , resources )) ):
1161
+ [ Sourceify (self .Absolutify ( r )) for r in resources ] ):
1162
1162
_ , ext = os .path .splitext (output )
1163
1163
if ext != '.xcassets' :
1164
1164
# Make does not supports '.xcassets' emulation.
@@ -1238,11 +1238,11 @@ def WriteSources(self, configs, deps, sources,
1238
1238
self .WriteList (cflags_objcc , 'CFLAGS_OBJCC_%s' % configname )
1239
1239
includes = config .get ('include_dirs' )
1240
1240
if includes :
1241
- includes = map ( Sourceify , map (self .Absolutify , includes ))
1241
+ includes = [ Sourceify (self .Absolutify ( i )) for i in includes ]
1242
1242
self .WriteList (includes , 'INCS_%s' % configname , prefix = '-I' )
1243
1243
1244
- compilable = filter (Compilable , sources )
1245
- objs = map ( self .Objectify , map (self .Absolutify , map (Target , compilable )))
1244
+ compilable = list ( filter (Compilable , sources ) )
1245
+ objs = [ self .Objectify (self .Absolutify (Target ( c ))) for c in compilable ]
1246
1246
self .WriteList (objs , 'OBJS' )
1247
1247
1248
1248
for obj in objs :
@@ -1314,7 +1314,7 @@ def WriteSources(self, configs, deps, sources,
1314
1314
1315
1315
# If there are any object files in our input file list, link them into our
1316
1316
# output.
1317
- extra_link_deps += filter (Linkable , sources )
1317
+ extra_link_deps += list ( filter (Linkable , sources ) )
1318
1318
1319
1319
self .WriteLn ()
1320
1320
@@ -1564,7 +1564,7 @@ def WriteTarget(self, spec, configs, deps, link_deps, bundle_deps,
1564
1564
1565
1565
# Bundle dependencies. Note that the code below adds actions to this
1566
1566
# target, so if you move these two lines, move the lines below as well.
1567
- self .WriteList (map ( QuoteSpaces , bundle_deps ) , 'BUNDLE_DEPS' )
1567
+ self .WriteList ([ QuoteSpaces ( dep ) for dep in bundle_deps ] , 'BUNDLE_DEPS' )
1568
1568
self .WriteLn ('%s: $(BUNDLE_DEPS)' % QuoteSpaces (self .output ))
1569
1569
1570
1570
# After the framework is built, package it. Needs to happen before
@@ -1598,7 +1598,7 @@ def WriteTarget(self, spec, configs, deps, link_deps, bundle_deps,
1598
1598
if self .type == 'executable' :
1599
1599
self .WriteLn ('%s: LD_INPUTS := %s' % (
1600
1600
QuoteSpaces (self .output_binary ),
1601
- ' ' .join (map ( QuoteSpaces , link_deps ) )))
1601
+ ' ' .join (QuoteSpaces ( dep ) for dep in link_deps )))
1602
1602
if self .toolset == 'host' and self .flavor == 'android' :
1603
1603
self .WriteDoCmd ([self .output_binary ], link_deps , 'link_host' ,
1604
1604
part_of_all , postbuilds = postbuilds )
@@ -1620,7 +1620,7 @@ def WriteTarget(self, spec, configs, deps, link_deps, bundle_deps,
1620
1620
elif self .type == 'shared_library' :
1621
1621
self .WriteLn ('%s: LD_INPUTS := %s' % (
1622
1622
QuoteSpaces (self .output_binary ),
1623
- ' ' .join (map ( QuoteSpaces , link_deps ) )))
1623
+ ' ' .join (QuoteSpaces ( dep ) for dep in link_deps )))
1624
1624
self .WriteDoCmd ([self .output_binary ], link_deps , 'solink' , part_of_all ,
1625
1625
postbuilds = postbuilds )
1626
1626
elif self .type == 'loadable_module' :
@@ -1746,8 +1746,8 @@ def WriteMakeRule(self, outputs, inputs, actions=None, comment=None,
1746
1746
output is just a name to run the rule
1747
1747
command: (optional) command name to generate unambiguous labels
1748
1748
"""
1749
- outputs = map ( QuoteSpaces , outputs )
1750
- inputs = map ( QuoteSpaces , inputs )
1749
+ outputs = [ QuoteSpaces ( o ) for o in outputs ]
1750
+ inputs = [ QuoteSpaces ( i ) for i in inputs ]
1751
1751
1752
1752
if comment :
1753
1753
self .WriteLn ('# ' + comment )
@@ -1836,7 +1836,7 @@ def WriteAndroidNdkModuleRule(self, module_name, all_sources, link_deps):
1836
1836
default_cpp_ext = ext
1837
1837
self .WriteLn ('LOCAL_CPP_EXTENSION := ' + default_cpp_ext )
1838
1838
1839
- self .WriteList (map (self .Absolutify , filter (Compilable , all_sources )),
1839
+ self .WriteList (list ( map (self .Absolutify , filter (Compilable , all_sources ) )),
1840
1840
'LOCAL_SRC_FILES' )
1841
1841
1842
1842
# Filter out those which do not match prefix and suffix and produce
@@ -1979,7 +1979,7 @@ def WriteAutoRegenerationRule(params, root_makefile, makefile_name,
1979
1979
"%(makefile_name)s: %(deps)s\n "
1980
1980
"\t $(call do_cmd,regen_makefile)\n \n " % {
1981
1981
'makefile_name' : makefile_name ,
1982
- 'deps' : ' ' .join (map ( SourceifyAndQuoteSpaces , build_files ) ),
1982
+ 'deps' : ' ' .join (SourceifyAndQuoteSpaces ( bf ) for bf in build_files ),
1983
1983
'cmd' : gyp .common .EncodePOSIXShellList (
1984
1984
[gyp_binary , '-fmake' ] +
1985
1985
gyp .RegenerateFlags (options ) +
0 commit comments