-
-
Notifications
You must be signed in to change notification settings - Fork 341
Open
Labels
Description
The Textfile builder could have an automatic translator to prevent needing to callback to scons, similar to the MkDir or Copy Builder:
scons/SCons/Tool/ninja/Rules.py
Lines 37 to 52 in f709352
| def _mkdir_action_function(env, node): | |
| return { | |
| "outputs": get_outputs(node), | |
| "rule": get_rule(node, "GENERATED_CMD"), | |
| # implicit explicitly omitted, we translate these so they can be | |
| # used by anything that depends on these but commonly this is | |
| # hit with a node that will depend on all of the fake | |
| # srcnode's that SCons will never give us a rule for leading | |
| # to an invalid ninja file. | |
| "variables": { | |
| # On Windows mkdir "-p" is always on | |
| "cmd": "mkdir {args}".format( | |
| args = ' '.join(get_outputs(node)) + " & exit /b 0" if env["PLATFORM"] == "win32" else "-p " + ' '.join(get_outputs(node)), | |
| ), | |
| }, | |
| } |
This was requested by a user in the scon's user mailing list thread: https://pairlist4.pair.net/pipermail/scons-users/2022-May/008985.html