">
      <!-- prettier-ignore -->
      <code data-lang="plz">
    genrule(
        name = "mocks",
        srcs = ["interfaces.go"],
        tools = {
            "mockgen": ["mockgen"],
        },
        cmd = "mkdir _out &amp;&amp; $TOOLS_MOCKGEN ... $SRCS -o _out"
        output_dirs = ["_out"],
    )
     </code>
    </pre>

    <p>
      If mockgen generates <code class="code">foo_mocks.go</code> and
      <code class="code">bar/bar_mocks.go</code>, these will become outputs of
      the rules as if 