I'd like to use
latexmk in a Makefile, so I've read the manual section on that. However, the dependency generation step seems less than ideal. Specifically, it seems that
latexmk can only show dependencies after fully building an output file (which can take a long time in my case). Is there a way to have
latexmk only output dependencies to a file and not mark the actual output file as up-to-date?
I've tried the following rule in my Makefile, but it seems to mark the output file as up-to-date. I'd also think it could run multiple times (or think it has failed) depending on what's in the log file.
%.d: %.tex @echo "Generating $@ from $<" @set -e; \ $(LATEXMK) -M -MF $@ -quiet -pdf \ -pdflatex="echo Generating dependencies from %T" $<