X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=latex_mk%2Ftest%2Ftoc%2FMakefile;h=dac8be36134dcef83db241267810384f45e19102;hb=5cf06a94624e9eb77d35557ece89ad36df1d0e3f;hp=173c7961fe30e41aa8839017078d9b39ef5081fe;hpb=f23677e78d4283bccb1d22f0558a75b03cbce4a1;p=makefiles.git diff --git a/latex_mk/test/toc/Makefile b/latex_mk/test/toc/Makefile index 173c796..dac8be3 100644 --- a/latex_mk/test/toc/Makefile +++ b/latex_mk/test/toc/Makefile @@ -1,20 +1,42 @@ TEXTARGETS := toc.pdf -.PHONY: all toc-update rebase clean distclean +CMP := cmp -s +DIFF := diff +PATCH := patch -all: $(TEXTARGETS) +.PHONY: all update rebase clean distclean -toc-update: - $(CP) toc.tex.6th toc.tex +$(TEXTARGETS): -body-update: - $(CP) toc.tex.5th_add toc.tex +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: - $(CP) toc.tex.5th toc.tex + $(CMP) toc.tex.5th toc.tex || $(CP) -v toc.tex.5th toc.tex include latex.mk clean: tex-clean -distclean: tex-distclean rebase +distclean: rebase tex-distclean + $(RM) *.patch + $(RM) toc_*.pdf