テスト用ファイルの整理
[makefiles.git] / latex_mk / test / toc / Makefile
deleted file mode 120000 (symlink)
index 2862b17342318f5486fd70525a74c0e66e13f5f9..0000000000000000000000000000000000000000
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile.template
\ No newline at end of file
new file mode 100644 (file)
index 0000000000000000000000000000000000000000..33996ecc128d7d16718f709fa54d773b24b89ecf
--- /dev/null
@@ -0,0 +1,40 @@
+TEXTARGETS := toc.pdf
+
+CMP := cmp -s
+DIFF := diff
+PATCH := patch
+
+.PHONY: all update rebase clean distclean
+
+all:
+       @$(MAKE) -s toc_1.pdf
+       @$(ECHO) '--------------------'
+       @$(MAKE) -s toc_2.pdf
+
+toc_1.pdf: rebase
+       @$(ECHO) '---------- $@: $^ ----------'
+       @$(MAKE) -s toc.pdf
+       @$(CP) -v toc.pdf $@
+
+toc_2.pdf: update
+       @$(ECHO) '---------- $@: $^ ----------'
+       @$(MAKE) -s toc.pdf
+       @$(CP) -v toc.pdf $@
+
+update: toc.tex.6th.patch
+       @$(PATCH) <$<
+
+toc.tex.6th.patch:
+       @$(MAKE) -s rebase
+       @$(DIFF) -u toc.tex toc.tex.6th >$@ || exit 0
+
+rebase:
+       $(CMP) toc.tex.5th toc.tex || $(CP) -v toc.tex.5th toc.tex
+
+include latex.mk
+
+clean: tex-clean
+
+distclean: rebase tex-distclean
+       $(RM) *.patch
+       $(RM) toc_*.pdf