[tex-eplain] Indexing and how to determine file dependencies
Hartmut Henkel
henkel@vh-s.de
Wed, 21 Feb 2001 17:19:29 +0100 (CET)
Hi,
(I am using eplain only seldomly, but) just to show where `make'
might help, see the example sniplet from my Makefile, which does only
the required number of latex/pdflatex (re)compilations, depending on
(PDF)LaTeX' Warning messages. It also removes traces of compilation,
when one switches back and forth between PDFLaTeX and LaTeX, since
PDFLaTeX sometimes complains about LaTeX' .aux files. Actually there
is no need to remove all these files, but I never checked, which really
have to be removed.
The blanks at the following line starts must be Tabs!
%.dvi: %.tex
$(SHELL) -c ' \
touch $(<:.tex=.log); \
if ! grep -q "This is TeX" $(<:.tex=.log); then \
rm -f $(<:.tex=.aux); \
rm -f $(<:.tex=.lof); \
rm -f $(<:.tex=.lot); \
rm -f $(<:.tex=.toc); \
rm -f $(<:.tex=.out); \
latex $<; fi;'
$(SHELL) -c ' \
latex $<; \
while grep -c "Warning.*Rerun" $(<:.tex=.log); \
do latex $<; done;'
%.pdf: %.tex
$(SHELL) -c ' \
touch $(<:.tex=.log); \
if ! grep -q "This is pdfTeX" $(<:.tex=.log); then \
rm -f $(<:.tex=.aux); \
rm -f $(<:.tex=.lof); \
rm -f $(<:.tex=.lot); \
rm -f $(<:.tex=.toc); \
rm -f $(<:.tex=.out); \
pdflatex $<; fi;'
$(SHELL) -c ' \
pdflatex $<; \
while grep -c "Warning.*Rerun" $(<:.tex=.log); \
do pdflatex $<; done;'
Best Regards
Hartmut
On 21 Feb 2001 John Culleton <john@wexfordpress.net> wrote:
> I don't doubt you have used make . What I question is whether you
> acheved significantly better results than you could have with a simple
> script. If you can educate me on the advantages of make over scripting
> in your products I would be grateful. If I can create a large document
> with three indexes in less than half a minute then the script approach is
> certainly feasable. The make aproach would be advantageous if and only if
> you could skip certain steps safely after changing certan bits and pieces.
>
> Make works by sensing the date and time of a piece of code. If the
> code for a particular chapter is changes it may impact the bibliography
> or it may not; it may impact the index or it may not. The only safe
> course is to rerun the indexing and biblio software again.
>
> Similarly TeX/LaTeX does not link previously typeset modules of text
> together. So if chapter 15 changes the entire book should be reset via TeX
> or LaTeX. Pagination may change . The Table of Contents may change. Make
> has no way of sensing these changes or the absence of these changes.
------------------------------------------------------------------------
Dr.-Ing. Hartmut Henkel
von Hoerner & Sulger GmbH, Schlossplatz 8
D-68723 Schwetzingen, Germany
E-Mail henkel@vh-s.de
WWW http://www.vh-s.de
------------------------------------------------------------------------