From 3ff4e21d29b62fc05f3fe593c574ae09bf021461 Mon Sep 17 00:00:00 2001 From: pcloudy Date: Mon, 5 Aug 2019 04:42:03 -0700 Subject: [PATCH] Refactor documentation for genrule Related #7503 RELNOTES[NEW]: Genrule now supports `cmd_bash`, `cmd_ps`, `cmd_bat` attributes. More details at https://docs.bazel.build/versions/master/be/general.html#genrule.cmd PiperOrigin-RevId: 261660849 --- .../lib/rules/genrule/GenRuleBaseRule.java | 48 ++++++++++--------- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/src/main/java/com/google/devtools/build/lib/rules/genrule/GenRuleBaseRule.java b/src/main/java/com/google/devtools/build/lib/rules/genrule/GenRuleBaseRule.java index b4f0f9566d3c00..45f73095ff9f21 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/genrule/GenRuleBaseRule.java +++ b/src/main/java/com/google/devtools/build/lib/rules/genrule/GenRuleBaseRule.java @@ -167,47 +167,50 @@ are always generated into a predictable location (available via $(@D)

- This is the fallback of `cmd_bash`, `cmd_ps` and `cmd_bat`, if none of them are applicable. + This is the fallback of cmd_bash, cmd_ps and cmd_bat, + if none of them are applicable.

If the command line length exceeds the platform limit (64K on Linux/macOS, 8K on Windows), then genrule will write the command to a script and execute that script to work around. This - applies to all cmd attributes (`cmd`, `cmd_bash`, `cmd_ps`, `cmd_bat`). + applies to all cmd attributes (cmd, cmd_bash, cmd_ps, + cmd_bat).

*/ .add(attr("cmd", STRING)) /* The Bash command to run. -

This attribute has higher priority than `cmd`. The command is expanded and runs in - the exact same way as the `cmd` attribute. +

This attribute has higher priority than cmd. The command is expanded and + runs in the exact same way as the cmd attribute.

*/ .add(attr("cmd_bash", STRING)) /* The Batch command to run on Windows. -

This attribute has higher priority than `cmd` and `cmd_bash`. The command runs in - the similar way as the `cmd` attribute, with the following differences: +

This attribute has higher priority than cmd and cmd_bash. + The command runs in the similar way as the cmd attribute, with the + following differences: