テスト用ファイルの整理
[makefiles.git] / latex_mk / test / toc / Makefile
1 TEXTARGETS := toc.pdf
2
3 CMP := cmp -s
4 DIFF := diff
5 PATCH := patch
6
7 .PHONY: all update rebase clean distclean
8
9 all:
10         @$(MAKE) -s toc_1.pdf
11         @$(ECHO) '--------------------'
12         @$(MAKE) -s toc_2.pdf
13
14 toc_1.pdf: rebase
15         @$(ECHO) '---------- $@: $^ ----------'
16         @$(MAKE) -s toc.pdf
17         @$(CP) -v toc.pdf $@
18
19 toc_2.pdf: update
20         @$(ECHO) '---------- $@: $^ ----------'
21         @$(MAKE) -s toc.pdf
22         @$(CP) -v toc.pdf $@
23
24 update: toc.tex.6th.patch
25         @$(PATCH) <$<
26
27 toc.tex.6th.patch:
28         @$(MAKE) -s rebase
29         @$(DIFF) -u toc.tex toc.tex.6th >$@ || exit 0
30
31 rebase:
32         $(CMP) toc.tex.5th toc.tex || $(CP) -v toc.tex.5th toc.tex
33
34 include latex.mk
35
36 clean: tex-clean
37
38 distclean: rebase tex-distclean
39         $(RM) *.patch
40         $(RM) toc_*.pdf