This is a quite general question, and so it'll be hard to write down a complete answer. I'll talk about when I use Make and when I use
latexmk is a tool for compiling
.tex files, and not much else. However, it's good at determining which files depend on which other files: you don't need to provide a list, so
latexmk main will only recompile when a dependency of
main.tex has changed.
latexmk will also compile files two or three times if needed (e.g. for bibliography, index, or hyperlink updates).
Make is much more general, but requires an explicit description of a file's dependencies and how to compile it. This information is provided in a file usually called
main depends on
eggs.tex, and that it sometimes needs to be compiled twice. Then, the makefile might like this:
# example makefile
INPUTS = main.tex macros.tex eggs.tex
COMPILER = pdflatex --halt-on-error
It's more work to manually specify the dependencies and compilation instructions, especially since they can change throughout a project. But Make's advantage is that it can execute any command. If your final file depends on running some statistical test and including the results in your document, Make can run the test. If your file contains code listings,
latexmk doesn't know to watch them for changes, but you can update
$(INPUTS) to include them if you're using Make.
Another use for Make is to automatically do something to your output files after compilation.
In summary, Make is more complicated, but able to handle non-TeX dependencies, so use it only if you have non-TeX dependencies or need to do postprocessing.
Examples of such dependencies:
- source code listings in a non-TeX language
- statistical graphs or statistical analyses that are automatically generated from data
- images that are automatically generated from inputs or data
- information obtained from the “outside world,” e.g. the user or the Internet
Examples of postprocessing:
- Converting the output PDF into an image
- Moving the output PDF into another directory
- Compressing the output PDF