"One-way" shake-build 中的依赖项?

"One-way" dependencies in shake-build?

我的脑子现在可能快炸了(已经连续 3 天研究这个 Shakefile),但我就是不知道如何在 Shake 中表达“单向”依赖?

我正在构建(生成)数百个 HTML 文件,要使它们正常工作,它们需要生成一个通用的 CSS 文件。如果我说类似...

"**.rst" %> \out -> do
  need [cssFile, templateFile]
  -- compile RST => HTML

...如果公共 CSS 文件更改,它会导致所有 HTML 文件被重新构建!

如何在shake中表达以下内容:

您可能正在从文档中寻找 orderOnly

Define order-only dependencies, these are dependencies that will always be built before continuing, but which aren't dependencies of this action. Mostly useful for defining generated dependencies you think might be real dependencies. If they turn out to be real dependencies, you should add an explicit dependency afterwards.

它并不完全符合您的要求(您并不需要在规则继续之前构建它),但它应该足够接近您的要求。