LaTeX will write the current time when creating a .dvi file.
Detection
Work-around
None yet.
Solution
Here's a way to use the file modification time instead of the current date and time:
--- iproute2-3.16.0.orig/doc/Makefile +++ iproute2-3.16.0/doc/Makefile @@ -42,7 +42,10 @@ print: $(PSFILES) %.dvi: %.tex @set -e; pass=2; echo "Running LaTeX $<"; \ - while [ `$(LATEX) $< </dev/null 2>&1 | \ + minutes_since_midnight=$$(expr `date -u "+%H" -r $<` '*' 60 + `date -u "+%M" -r $<`); \ + creation_time=$$(date -u "+\year=%Y\month=%m\day=%d\time=$$minutes_since_midnight" -r $<); \ + echo "$$creation_time"; \ + while [ `$(LATEX) "$$creation_time\input $<" </dev/null 2>&1 | \ grep -c '^\(LaTeX Warning: Label(s) may\|No file \|! Emergency stop\)'` -ge 1 ]; do \ if [ $$pass -gt 3 ]; then \ echo "Seems, something is wrong. Try by hands." ; exit 1 ; \
It's not the best approach, the .tex file itself can be generated. But this shows how to set the timestamp.
Alternatives
Another way is to prevent embedding the date completely. The date is written inside the DVI comment field, which can be set to any value or cleared with latex --output-comment=""
If you’re using pdfTeX (see pdftex(1)), you may also export FORCE_SOURCE_DATE from debian/rules so that SOURCE_DATE_EPOCH is honoured (SOURCE_DATE_EPOCH is defined automatically nowadays):
# debian/rules export FORCE_SOURCE_DATE = 1