MCPcopy Create free account
hub / github.com/nodejs/node / _AddActions

Function _AddActions

tools/gyp/pylib/gyp/generator/msvs.py:1702–1726  ·  view source on GitHub ↗
(actions_to_add, spec, relative_path_of_gyp_file)

Source from the content-addressed store, hash-verified

1700
1701
1702def _AddActions(actions_to_add, spec, relative_path_of_gyp_file):
1703 # Add actions.
1704 actions = spec.get("actions", [])
1705 # Don't setup_env every time. When all the actions are run together in one
1706 # batch file in VS, the PATH will grow too long.
1707 # Membership in this set means that the cygwin environment has been set up,
1708 # and does not need to be set up again.
1709 have_setup_env = set()
1710 for a in actions:
1711 # Attach actions to the gyp file if nothing else is there.
1712 inputs = a.get("inputs") or [relative_path_of_gyp_file]
1713 attached_to = inputs[0]
1714 need_setup_env = attached_to not in have_setup_env
1715 cmd = _BuildCommandLineForRule(
1716 spec, a, has_input_path=False, do_setup_env=need_setup_env
1717 )
1718 have_setup_env.add(attached_to)
1719 # Add the action.
1720 _AddActionStep(
1721 actions_to_add,
1722 inputs=inputs,
1723 outputs=a.get("outputs", []),
1724 description=a.get("message", a["action_name"]),
1725 command=cmd,
1726 )
1727
1728
1729def _WriteMSVSUserFile(project_path, version, spec):

Callers 2

_GenerateMSVSProjectFunction · 0.85
_GenerateMSBuildProjectFunction · 0.85

Calls 5

_BuildCommandLineForRuleFunction · 0.85
_AddActionStepFunction · 0.85
getMethod · 0.65
addMethod · 0.65
setFunction · 0.50

Tested by

no test coverage detected