shake-build-system

shake build without producing a file for every input file


Building .html files from .md files for a web site, I have some .md files which should not produce an output .html (e.g. because not ready for publication). What is the best way to achieve this with shake?

I have a want for html files and a rule which searches the corresponding .md file, but some do not produce the .html and shake stops with the error Error, rule finished running but did not produce file:.

What is the best way to deal with this case?


Solution

  • The current restriction is that every file must produce a result. Some other build systems are slightly more lax about that, but my experience is it's nearly always a source of bugs - although in some cases it is useful (e.g. yours). The options are:

    Unfortunately, neither of these situations is ideal. At one point Shake had the option to make failure to create a file a valid result, which could be reintroduced if there was sufficient demand.