I'm writing Shake build rules for some ultimate result _build/a.4
. Let's say its direct dependency is _build/a.3
, which in turn depends on _build/a.2
, and so on to _build/a.1
. I also have a rule which produces _build/a.1
in some "bespoke" manner.
Is it better to write these rules as e.g.
"_build/a.4" %> \_ -> do
...
or
"_build/*.4" %> \ out -> do
...
? Note that since the rule for _build/a.1
is not generalizable, there will never be any other chain than _build/a.4
and so on, so it is not, in practice, possible to build _build/b.4
.
On one hand, to me, generalizing the build rules seems like the "nice" way of going around, since it points towards an eventual "librarization" of the build rules. On the other hand, the output of the --help
flag gives less direction / "false hope" to the user with the generalized version, since it implies that any _build/foo.4
file that the user can think of will be buildable.