On 2007-08-14, Robin Sheat wrote:
> > * The paretheses around the while-condition creates a sub-shell; I
> > don't think that's needed here.
> You're spawning off pdflatex and egrep anyway, I think it's probably not a
> huge loss :) that said, there may be a more make-ish way of doing this
> (although, the shell is probably needed to avoid the grep output going to the
> terminal)
True, the extra sub-shell is a cheap operation; just pointing out that
it's redundant. (It does not affect redirection here.)
> > * Is there something which you could grep for to test if the bibtex
> > invocation is needed? (It's some time since I used BibTeX myself.)
> Hmm. I expect that it would give you the same 'rerun to get citations'
> message, but I'm not sure. Best to force it to ensure it's up-to-date anyway.
> Of course, that could be tested with make if you want to be fancy :)
But we could grep the document itself instead:
if ! $(PDFLATEX) $(LATEX_FLAGS) $<; then rm -f $@; false; fi
if fgrep -q '\bibliography' $<; then bibtex $*; fi
while egrep -q 'Rerun to get (cross|cita)' $*.log; do \
$(PDFLATEX) $(LATEX_FLAGS) $<; \
done
I'll commit after testing, unless someone sees a problem with this.
_______________________________________________
Open-graphics mailing list
[email protected]
http://lists.duskglow.com/mailman/listinfo/open-graphics
List service provided by Duskglow Consulting, LLC (www.duskglow.com)