@@ -800,7 +800,7 @@ def Write(self, qualified_target, base_path, output_filename, spec, configs,
800
800
gyp .xcode_emulation .MacPrefixHeader (
801
801
self .xcode_settings , lambda p : Sourceify (self .Absolutify (p )),
802
802
self .Pchify ))
803
- sources = filter (Compilable , all_sources )
803
+ sources = list ( filter (Compilable , all_sources ) )
804
804
if sources :
805
805
self .WriteLn (SHARED_HEADER_SUFFIX_RULES_COMMENT1 )
806
806
extensions = set ([os .path .splitext (s )[1 ] for s in sources ])
@@ -953,7 +953,7 @@ def WriteActions(self, actions, extra_sources, extra_outputs,
953
953
outputs = [gyp .xcode_emulation .ExpandEnvVars (o , env ) for o in outputs ]
954
954
inputs = [gyp .xcode_emulation .ExpandEnvVars (i , env ) for i in inputs ]
955
955
956
- self .WriteDoCmd (outputs , map ( Sourceify , map (self .Absolutify , inputs )) ,
956
+ self .WriteDoCmd (outputs , [ Sourceify (self .Absolutify ( i )) for i in inputs ] ,
957
957
part_of_all = part_of_all , command = name )
958
958
959
959
# Stuff the outputs in a variable so we can refer to them later.
@@ -1002,8 +1002,8 @@ def WriteRules(self, rules, extra_sources, extra_outputs,
1002
1002
extra_sources += outputs
1003
1003
if int (rule .get ('process_outputs_as_mac_bundle_resources' , False )):
1004
1004
extra_mac_bundle_resources += outputs
1005
- inputs = map ( Sourceify , map (self .Absolutify , [ rule_source ] +
1006
- rule .get ('inputs' , [])))
1005
+ inputs = [ Sourceify (self .Absolutify ( i )) for i
1006
+ in [ rule_source ] + rule .get ('inputs' , [])]
1007
1007
actions = ['$(call do_cmd,%s_%d)' % (name , count )]
1008
1008
1009
1009
if name == 'resources_grit' :
@@ -1126,7 +1126,7 @@ def WriteCopies(self, copies, extra_outputs, part_of_all):
1126
1126
path = gyp .xcode_emulation .ExpandEnvVars (path , env )
1127
1127
self .WriteDoCmd ([output ], [path ], 'copy' , part_of_all )
1128
1128
outputs .append (output )
1129
- self .WriteLn ('%s = %s' % (variable , ' ' .join (map ( QuoteSpaces , outputs ) )))
1129
+ self .WriteLn ('%s = %s' % (variable , ' ' .join (QuoteSpaces ( o ) for o in outputs )))
1130
1130
extra_outputs .append ('$(%s)' % variable )
1131
1131
self .WriteLn ()
1132
1132
@@ -1137,7 +1137,7 @@ def WriteMacBundleResources(self, resources, bundle_deps):
1137
1137
1138
1138
for output , res in gyp .xcode_emulation .GetMacBundleResources (
1139
1139
generator_default_variables ['PRODUCT_DIR' ], self .xcode_settings ,
1140
- map ( Sourceify , map (self .Absolutify , resources )) ):
1140
+ [ Sourceify (self .Absolutify ( r )) for r in resources ] ):
1141
1141
_ , ext = os .path .splitext (output )
1142
1142
if ext != '.xcassets' :
1143
1143
# Make does not supports '.xcassets' emulation.
@@ -1217,11 +1217,11 @@ def WriteSources(self, configs, deps, sources,
1217
1217
self .WriteList (cflags_objcc , 'CFLAGS_OBJCC_%s' % configname )
1218
1218
includes = config .get ('include_dirs' )
1219
1219
if includes :
1220
- includes = map ( Sourceify , map (self .Absolutify , includes ))
1220
+ includes = [ Sourceify (self .Absolutify ( i )) for i in includes ]
1221
1221
self .WriteList (includes , 'INCS_%s' % configname , prefix = '-I' )
1222
1222
1223
- compilable = filter (Compilable , sources )
1224
- objs = map ( self .Objectify , map (self .Absolutify , map (Target , compilable )))
1223
+ compilable = list ( filter (Compilable , sources ) )
1224
+ objs = [ self .Objectify (self .Absolutify (Target ( c ))) for c in compilable ]
1225
1225
self .WriteList (objs , 'OBJS' )
1226
1226
1227
1227
for obj in objs :
@@ -1293,7 +1293,7 @@ def WriteSources(self, configs, deps, sources,
1293
1293
1294
1294
# If there are any object files in our input file list, link them into our
1295
1295
# output.
1296
- extra_link_deps += filter (Linkable , sources )
1296
+ extra_link_deps += list ( filter (Linkable , sources ) )
1297
1297
1298
1298
self .WriteLn ()
1299
1299
@@ -1543,7 +1543,7 @@ def WriteTarget(self, spec, configs, deps, link_deps, bundle_deps,
1543
1543
1544
1544
# Bundle dependencies. Note that the code below adds actions to this
1545
1545
# target, so if you move these two lines, move the lines below as well.
1546
- self .WriteList (map ( QuoteSpaces , bundle_deps ) , 'BUNDLE_DEPS' )
1546
+ self .WriteList ([ QuoteSpaces ( dep ) for dep in bundle_deps ] , 'BUNDLE_DEPS' )
1547
1547
self .WriteLn ('%s: $(BUNDLE_DEPS)' % QuoteSpaces (self .output ))
1548
1548
1549
1549
# After the framework is built, package it. Needs to happen before
@@ -1577,7 +1577,7 @@ def WriteTarget(self, spec, configs, deps, link_deps, bundle_deps,
1577
1577
if self .type == 'executable' :
1578
1578
self .WriteLn ('%s: LD_INPUTS := %s' % (
1579
1579
QuoteSpaces (self .output_binary ),
1580
- ' ' .join (map ( QuoteSpaces , link_deps ) )))
1580
+ ' ' .join (QuoteSpaces ( dep ) for dep in link_deps )))
1581
1581
if self .toolset == 'host' and self .flavor == 'android' :
1582
1582
self .WriteDoCmd ([self .output_binary ], link_deps , 'link_host' ,
1583
1583
part_of_all , postbuilds = postbuilds )
@@ -1599,7 +1599,7 @@ def WriteTarget(self, spec, configs, deps, link_deps, bundle_deps,
1599
1599
elif self .type == 'shared_library' :
1600
1600
self .WriteLn ('%s: LD_INPUTS := %s' % (
1601
1601
QuoteSpaces (self .output_binary ),
1602
- ' ' .join (map ( QuoteSpaces , link_deps ) )))
1602
+ ' ' .join (QuoteSpaces ( dep ) for dep in link_deps )))
1603
1603
self .WriteDoCmd ([self .output_binary ], link_deps , 'solink' , part_of_all ,
1604
1604
postbuilds = postbuilds )
1605
1605
elif self .type == 'loadable_module' :
@@ -1815,7 +1815,7 @@ def WriteAndroidNdkModuleRule(self, module_name, all_sources, link_deps):
1815
1815
default_cpp_ext = ext
1816
1816
self .WriteLn ('LOCAL_CPP_EXTENSION := ' + default_cpp_ext )
1817
1817
1818
- self .WriteList (map (self .Absolutify , filter (Compilable , all_sources )),
1818
+ self .WriteList (list ( map (self .Absolutify , filter (Compilable , all_sources ) )),
1819
1819
'LOCAL_SRC_FILES' )
1820
1820
1821
1821
# Filter out those which do not match prefix and suffix and produce
@@ -1956,7 +1956,7 @@ def WriteAutoRegenerationRule(params, root_makefile, makefile_name,
1956
1956
"%(makefile_name)s: %(deps)s\n "
1957
1957
"\t $(call do_cmd,regen_makefile)\n \n " % {
1958
1958
'makefile_name' : makefile_name ,
1959
- 'deps' : ' ' .join (map ( Sourceify , build_files ) ),
1959
+ 'deps' : ' ' .join (Sourceify ( bf ) for bf in build_files ),
1960
1960
'cmd' : gyp .common .EncodePOSIXShellList (
1961
1961
[gyp_binary , '-fmake' ] +
1962
1962
gyp .RegenerateFlags (options ) +
0 commit comments