help-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re-entrancy in Make


From: Peter Flynn
Subject: Re-entrancy in Make
Date: Tue, 25 Sep 2012 22:39:13 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:15.0) Gecko/20120827 Thunderbird/15.0

I'm trying to construct a Makefile to handle the processing of
machine-generated LaTeX documents. The Makefile will eventually be
written by the same routine that creates the .tex file[s], so that each
one can ship with its own custom Makefile.

Because of the two-stage nature of LaTeX processing of cross-references,
tables of contents, bibliographic references, indexes, etc, a complete
cycle is:

latex fn; bibtex fn; latex fn; makeindex fn; latex fn

(where the bibtex input [yes, the actual .bib file as well as the .aux
file] is written during the first latex pass, and the makeindex input is
written during the second latex pass).

Is there a way for Make to know whether (for example) a particular
file's *content* has changed since the last time LaTeX was run? as
opposed to merely its timestamp.

My (possibly flaky) understanding is that Make looks at the timestamps
of the target and the dependencies to compute if a rule is to be
executed; is there a technique to store and compare some other values
such as the MD5 of the current and previous versions of a file, or the
diff output? Or can this be done manually with shell calls and conditionals?

///Peter



reply via email to

[Prev in Thread] Current Thread [Next in Thread]