Referring to this question, I found that having multiple custom-generated files in a document generated by latexmk doesn't really work for me.
The modus operandi is that latexmk runs pdflatex, checking that noteable's output for missing file errors, then generating that file, then re-running pdflatex.
However, I have many files to be generated this way, and every pass of the above process only generates one of them (then re-running, finding the next missing file, generating that, rerunning... until latexmk gives up due to too many re-runs.)
Apparently I am doing something wrong, am missing a crucial command-line option or somesuch. But perusing the manual didn't enlighten me. Help, please?
Edit: I am aware that I could just use a common Makefile rule to generate those files outside the control of latexmk, with the document depending on those generated files. But I would like to know how it could be done without adding the dependencies to the Makefile, either manually or by having latexmk print Makefile rules, through -use-make or add_cus_dep()` or somesuch.
Edit2: A MWE for this:
Makefile:
test.pdf:
latexmk -pdf -pdflatex="pdflatex -interaction=nonstopmode" -use-make test.tex
%.tex:
echo "Foo" > $@
clean:
rm foo* test.pdf
test.tex:
\documentclass{article}
\begin{document}
\input{foo1}
\input{foo2}
\input{foo3}
\input{foo4}
\input{foo5}
\input{foo6}
\end{document}
Edit3: As a sidenote, latexmk -CA does not remove the files that are generated, either. There is a message of "checking foo1.log for generated files", but foo1.tex remains, which isn't what I would expect from a "clear all" option...
Edit4: This only happens with \input. If I use \include in the MWE above, everything works as I would expect: All custom file generation happens in the first pass. How can I get that behaviour with \input, too?
latexmkfails doing what you want? – N.N. Jan 12 '12 at 09:09pdflatexis re-run after every single generated file, eventually ending in a "too many re-runs" error message. Desired behaviour: All files being generated, ideally in a single pass instead of re-starting after each file (re performance), and the PDF eventually being created successfully. – DevSolar Jan 12 '12 at 10:18\input, with\includeworking as expected. – DevSolar Jan 12 '12 at 10:46