- $(LATEX) $(LATEXFLAGS) $< | pee cat "$(GREP) -iFq 'Rerun'"\
- && $(LATEX) $(LATEXFLAGS) $< | pee cat "$(GREP) -iFq 'Rerun'"\
- && $(LATEX) $(LATEXFLAGS) $< | pee cat "$(GREP) -iFq 'Rerun'"\
- && $(LATEX) $(LATEXFLAGS) $< | pee cat "$(GREP) -iFq 'Rerun'"\
- || true
+ $(LATEX) $(LATEXFLAGS) $< | tee $(basename $@).mlog
+ $(GREP) -iFq 'Rerun' $(basename $@).mlog && $(LATEX) $(LATEXFLAGS) $< | tee $(basename $@).mlog || true
+ $(GREP) -iFq 'Rerun' $(basename $@).mlog && $(LATEX) $(LATEXFLAGS) $< | tee $(basename $@).mlog || true
+ $(GREP) -iFq 'Rerun' $(basename $@).mlog && $(LATEX) $(LATEXFLAGS) $< | tee $(basename $@).mlog || true
+ $(RM) $(basename $@).mlog