Skip to content

Commit

Permalink
fix: format
Browse files Browse the repository at this point in the history
  • Loading branch information
gengjiawen committed May 7, 2022
1 parent 349fcc1 commit d7bbf62
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
14 changes: 9 additions & 5 deletions pylib/gyp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,16 @@ def Load(
default_variables.setdefault(key, val)

output_dir = params["options"].generator_output or params["options"].toplevel_dir
if (default_variables['GENERATOR'] == 'ninja'):
default_variables.setdefault("PRODUCT_DIR_ABS", os.path.join(output_dir,
'out', default_variables['build_type']))
if default_variables["GENERATOR"] == "ninja":
default_variables.setdefault(
"PRODUCT_DIR_ABS",
os.path.join(output_dir, "out", default_variables["build_type"]),
)
else:
default_variables.setdefault("PRODUCT_DIR_ABS", os.path.join(output_dir,
default_variables['CONFIGURATION_NAME']))
default_variables.setdefault(
"PRODUCT_DIR_ABS",
os.path.join(output_dir, default_variables["CONFIGURATION_NAME"]),
)

# Give the generator the opportunity to set additional variables based on
# the params it will receive in the output phase.
Expand Down
8 changes: 4 additions & 4 deletions pylib/gyp/generator/make.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,12 @@ def CalculateGeneratorInputInfo(params):
# Note: this does not handle spaces in paths
define xargs
$(1) $(word 1,$(2))
$(1) $(word 1,$(2))
$(if $(word 2,$(2)),$(call xargs,$(1),$(wordlist 2,$(words $(2)),$(2))))
endef
define write-to-file
@: >$(1)
@: >$(1)
$(call xargs,@printf "%s\\n" >>$(1),$(2))
endef
Expand Down Expand Up @@ -227,12 +227,12 @@ def CalculateGeneratorInputInfo(params):
# Note: this does not handle spaces in paths
define xargs
$(1) $(word 1,$(2))
$(1) $(word 1,$(2))
$(if $(word 2,$(2)),$(call xargs,$(1),$(wordlist 2,$(words $(2)),$(2))))
endef
define write-to-file
@: >$(1)
@: >$(1)
$(call xargs,@printf "%s\\n" >>$(1),$(2))
endef
Expand Down

0 comments on commit d7bbf62

Please sign in to comment.