@@ -106,6 +106,7 @@ def CalculateVariables(default_variables, params):
106
106
default_variables .setdefault ("SHARED_LIB_DIR" , "$(builddir)/lib.$(TOOLSET)" )
107
107
default_variables .setdefault ("LIB_DIR" , "$(obj).$(TOOLSET)" )
108
108
109
+
109
110
def CalculateGeneratorInputInfo (params ):
110
111
"""Calculate the generator specific info that gets fed to input (called by
111
112
gyp)."""
@@ -157,12 +158,12 @@ def CalculateGeneratorInputInfo(params):
157
158
158
159
# Note: this does not handle spaces in paths
159
160
define xargs
160
- $(1) $(word 1,$(2))
161
+ $(1) $(word 1,$(2))
161
162
$(if $(word 2,$(2)),$(call xargs,$(1),$(wordlist 2,$(words $(2)),$(2))))
162
163
endef
163
164
164
165
define write-to-file
165
- @: >$(1)
166
+ @: >$(1)
166
167
$(call xargs,@printf "%s\\ n" >>$(1),$(2))
167
168
endef
168
169
@@ -226,12 +227,12 @@ def CalculateGeneratorInputInfo(params):
226
227
227
228
# Note: this does not handle spaces in paths
228
229
define xargs
229
- $(1) $(word 1,$(2))
230
+ $(1) $(word 1,$(2))
230
231
$(if $(word 2,$(2)),$(call xargs,$(1),$(wordlist 2,$(words $(2)),$(2))))
231
232
endef
232
233
233
234
define write-to-file
234
- @: >$(1)
235
+ @: >$(1)
235
236
$(call xargs,@printf "%s\\ n" >>$(1),$(2))
236
237
endef
237
238
@@ -1858,35 +1859,35 @@ def WriteTarget(
1858
1859
self .flavor not in ("mac" , "openbsd" , "netbsd" , "win" )
1859
1860
and not self .is_standalone_static_library
1860
1861
):
1861
- if self .flavor in (' linux' , ' android' ):
1862
- self .WriteMakeRule (
1863
- [self .output_binary ],
1864
- link_deps ,
1865
- actions = [ ' $(call create_thin_archive,$@,$^)' ]
1866
- )
1862
+ if self .flavor in (" linux" , " android" ):
1863
+ self .WriteMakeRule (
1864
+ [self .output_binary ],
1865
+ link_deps ,
1866
+ actions = [ " $(call create_thin_archive,$@,$^)" ],
1867
+ )
1867
1868
else :
1868
- self .WriteDoCmd (
1869
- [self .output_binary ],
1870
- link_deps ,
1871
- "alink_thin" ,
1872
- part_of_all ,
1873
- postbuilds = postbuilds ,
1874
- )
1869
+ self .WriteDoCmd (
1870
+ [self .output_binary ],
1871
+ link_deps ,
1872
+ "alink_thin" ,
1873
+ part_of_all ,
1874
+ postbuilds = postbuilds ,
1875
+ )
1875
1876
else :
1876
- if self .flavor in (' linux' , ' android' ):
1877
- self .WriteMakeRule (
1878
- [self .output_binary ],
1879
- link_deps ,
1880
- actions = [ ' $(call create_archive,$@,$^)' ]
1881
- )
1882
- else :
1883
- self .WriteDoCmd (
1884
- [self .output_binary ],
1885
- link_deps ,
1886
- "alink" ,
1887
- part_of_all ,
1888
- postbuilds = postbuilds ,
1889
- )
1877
+ if self .flavor in (" linux" , " android" ):
1878
+ self .WriteMakeRule (
1879
+ [self .output_binary ],
1880
+ link_deps ,
1881
+ actions = [ " $(call create_archive,$@,$^)" ],
1882
+ )
1883
+ else :
1884
+ self .WriteDoCmd (
1885
+ [self .output_binary ],
1886
+ link_deps ,
1887
+ "alink" ,
1888
+ part_of_all ,
1889
+ postbuilds = postbuilds ,
1890
+ )
1890
1891
elif self .type == "shared_library" :
1891
1892
self .WriteLn (
1892
1893
"%s: LD_INPUTS := %s"
@@ -1904,9 +1905,15 @@ def WriteTarget(
1904
1905
)
1905
1906
# z/OS has a .so target as well as a sidedeck .x target
1906
1907
if self .flavor == "zos" :
1907
- self .WriteLn ('%s: %s' % (
1908
- QuoteSpaces (self .GetSharedObjectFromSidedeck (self .output_binary )),
1909
- QuoteSpaces (self .output_binary )))
1908
+ self .WriteLn (
1909
+ "%s: %s"
1910
+ % (
1911
+ QuoteSpaces (
1912
+ self .GetSharedObjectFromSidedeck (self .output_binary )
1913
+ ),
1914
+ QuoteSpaces (self .output_binary ),
1915
+ )
1916
+ )
1910
1917
elif self .type == "loadable_module" :
1911
1918
for link_dep in link_deps :
1912
1919
assert " " not in link_dep , (
@@ -1993,35 +2000,42 @@ def WriteTarget(
1993
2000
)
1994
2001
if self .flavor != "zos" :
1995
2002
installable_deps .append (install_path )
1996
- if self .flavor == ' zos' and self .type == ' shared_library' :
2003
+ if self .flavor == " zos" and self .type == " shared_library" :
1997
2004
# lib.target/libnode.so has a dependency on $(obj).target/libnode.so
1998
- self .WriteDoCmd ([self .GetSharedObjectFromSidedeck (install_path )],
1999
- [self .GetSharedObjectFromSidedeck (self .output )], 'copy' ,
2000
- comment = 'Copy this to the %s output path.' %
2001
- file_desc , part_of_all = part_of_all )
2005
+ self .WriteDoCmd (
2006
+ [self .GetSharedObjectFromSidedeck (install_path )],
2007
+ [self .GetSharedObjectFromSidedeck (self .output )],
2008
+ "copy" ,
2009
+ comment = "Copy this to the %s output path." % file_desc ,
2010
+ part_of_all = part_of_all ,
2011
+ )
2002
2012
# Create a symlink of libnode.x to libnode.version.x
2003
- self .WriteDoCmd ([self .GetUnversionedSidedeckFromSidedeck (install_path )],
2004
- [install_path ], 'symlink' ,
2005
- comment = 'Symlnk this to the %s output path.' %
2006
- file_desc , part_of_all = part_of_all )
2013
+ self .WriteDoCmd (
2014
+ [self .GetUnversionedSidedeckFromSidedeck (install_path )],
2015
+ [install_path ],
2016
+ "symlink" ,
2017
+ comment = "Symlnk this to the %s output path." % file_desc ,
2018
+ part_of_all = part_of_all ,
2019
+ )
2007
2020
# Place libnode.version.so and libnode.x symlink in lib.target dir
2008
2021
installable_deps .append (self .GetSharedObjectFromSidedeck (install_path ))
2009
2022
installable_deps .append (
2010
- self .GetUnversionedSidedeckFromSidedeck (install_path ))
2023
+ self .GetUnversionedSidedeckFromSidedeck (install_path )
2024
+ )
2011
2025
if self .output != self .alias and self .alias != self .target :
2012
2026
self .WriteMakeRule (
2013
2027
[self .alias ],
2014
2028
installable_deps ,
2015
2029
comment = "Short alias for building this %s." % file_desc ,
2016
2030
phony = True ,
2017
2031
)
2018
- if self .flavor == ' zos' and self .type == ' shared_library' :
2032
+ if self .flavor == " zos" and self .type == " shared_library" :
2019
2033
# Make sure that .x symlink target is run
2020
2034
self .WriteMakeRule (
2021
- [' all' ],
2035
+ [" all" ],
2022
2036
[
2023
2037
self .GetUnversionedSidedeckFromSidedeck (install_path ),
2024
- self .GetSharedObjectFromSidedeck (install_path )
2038
+ self .GetSharedObjectFromSidedeck (install_path ),
2025
2039
],
2026
2040
comment = 'Add %s to "all" target.' % file_desc ,
2027
2041
phony = True ,
0 commit comments