summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/pdftex/tests/03-deterministic-output/Makefile
blob: cbf7ee13b25cd262f81643e4618c58a1789d7ec9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# $Id: Makefile 740 2016-04-23 15:08:37Z karl $
# Public domain.

include ../Common.mak

test1:
	$(prog) test-no-date-id.tex

test2:
	$(prog) test-fixed-date-id.tex

test = test-SOURCE_DATE_EPOCH
# test invalid settings of the envvar.
test3-invalid:
	-SOURCE_DATE_EPOCH=" "    $(prog) $(test).tex
	-SOURCE_DATE_EPOCH=abc123 $(prog) $(test).tex
	-SOURCE_DATE_EPOCH=0.0    $(prog) $(test).tex
	-SOURCE_DATE_EPOCH=-1     $(prog) $(test).tex
	-SOURCE_DATE_EPOCH=123abc $(prog) $(test).tex
	-SOURCE_DATE_EPOCH=994399281551439928155 $(prog) $(test).tex

test3-orig.pdf:
	$(prog) $(test).tex && mv $(test).pdf $@

# test valid settings of the envvar.
test3-valid: test3-orig.pdf test3-repro.pdf
	SOURCE_DATE_EPOCH=0  $(prog) $(test).tex
	SOURCE_DATE_EPOCH="" $(prog) $(test).tex # same as 0
	-$(diff) $< $(test).pdf              # shows differences
	SOURCE_DATE_EPOCH=10 $(prog) $(test).tex
	$(diff) test3-repro.pdf $(test).pdf  # should be identical
#	SOURCE_DATE_EPOCH=1439928155 $(prog) $(test).tex

# make an original with nonzero time for checking.
test3-repro.pdf:
	SOURCE_DATE_EPOCH=10 $(prog) $(test).tex && mv $(test).pdf $@

clean:
	rm -f *.log *.pdf *.fmt *.aux

fmt:
	$(prog) *pdflatex.ini
	$(prog) *pdfetex.ini