bazel-skylib/rules
László Csomor 8d4f7612b2
maprule: an improved version of genrule() (#86)
maprule() is an improved version of
native.genrule(), with the following advantages:

- Maprule can process source files in parallel,
  creating separate actions for each of them.

- Maprule does not require declaring all output
  files. Instead you declare templates for the
  output files yielded for each source. Therefore
  N source files and M templates yield N*M
  outputs.

- Maprule supports both Bash and cmd.exe syntax
  for its commands via the specialized rules
  bash_maprule and cmd_maprule.

- Maprule's cmd attribute does deliberately not
  support $(location) expression nor Make
  Variables, in order to avoid issues and
  challenges with quoting. (In case of cmd.exe
  passing empty arguments is impossible). These
  paths can be passed as envvars instead.

- Maprule's add_env attribute does support
  $(location) expressions (and some extra
  placeholders) and is the idiomatic way to pass
  execpaths of labels in "tools" or "srcs" (the
  shared sources available for all actions) to the
  command.

See https://github.com/bazelbuild/bazel/issues/4319
2019-01-08 09:04:53 +01:00
..
BUILD maprule: an improved version of genrule() (#86) 2019-01-08 09:04:53 +01:00
maprule.bzl maprule: an improved version of genrule() (#86) 2019-01-08 09:04:53 +01:00
maprule_private.bzl maprule: an improved version of genrule() (#86) 2019-01-08 09:04:53 +01:00
maprule_testing.bzl maprule: an improved version of genrule() (#86) 2019-01-08 09:04:53 +01:00