make: fix dirty check, support concurrent build #65
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is in reference to pull request #61. I lost my commit, and had to re-create it, and open a new pull-request
if we hardwire the build script in the target commands, then what we
want to do remains opaque to make. it is better to speak make's
language, so it understands us, so we can rip the benefits from that.
we don't have 1 test target, but 3: the 3 pdf examples. when we extract
3 rules from the 1 we have right now, make gets to understand what we
want to do:
when make gets to know what the products and their dependencies are, it
can tell when there is no work to do. for example, if a pdf is already
there, and its tex dependency hasn't changed, there is no need to
re-compile the pdf.
when make knows the products are independent of each other, and we
compile with make -j, then it can build faster by compiling the pdfs
concurrently, rather than serially one after the other.
and, there is an additional benefit here: we can compile a particular
pdf, and not the others: make examples/cv.pdf.
finally, note that because now make can tell when there's nothing to do,
you might be surprised if, for example, on a pristine checkout of the
repository, you run make, and make responds
this is because the pdfs are checked in, and make sees the texs haven't
changed since they were last compiled. to force a build as was the case
before, run make -B. alternatively, you can touch any of the tex files,
and make will recompile the touched texs.