(actions_to_add, spec, relative_path_of_gyp_file)
| 1700 | |
| 1701 | |
| 1702 | def _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 | |
| 1729 | def _WriteMSVSUserFile(project_path, version, spec): |
no test coverage detected