X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=latex_mk%2Ftest%2Ftoc_hyperref%2FMakefile;h=4b63a538aba03990bdead8402fc544ef84e1ea26;hb=17ce78ac53191822496466976ca0bc8e0927822b;hp=170b54000f6a66dc546ae3357890a37678b03a49;hpb=119ed2bf50db8ad221b1fe82756259bebe2757e5;p=makefiles.git diff --git a/latex_mk/test/toc_hyperref/Makefile b/latex_mk/test/toc_hyperref/Makefile index 170b540..4b63a53 100644 --- a/latex_mk/test/toc_hyperref/Makefile +++ b/latex_mk/test/toc_hyperref/Makefile @@ -1,20 +1,42 @@ TEXTARGETS := toc_hyperref.pdf +CMP := cmp -s +DIFF := diff +PATCH := patch + .PHONY: all update rebase clean distclean -all: $(TEXTARGETS) +$(TEXTARGETS): -update: toc_hyperref.tex - $(CP) toc_hyperref.tex.6th toc_hyperref.tex +all: + @$(MAKE) -s toc_hyperref_1.pdf + @$(ECHO) '--------------------' + @$(MAKE) -s toc_hyperref_2.pdf -rebase: - $(CP) toc_hyperref.tex.5th toc_hyperref.tex +toc_hyperref_1.pdf: rebase + @$(ECHO) '---------- $@: $^ ----------' + @$(MAKE) -s toc_hyperref.pdf + @$(CP) -v toc_hyperref.pdf $@ + +toc_hyperref_2.pdf: update + @$(ECHO) '---------- $@: $^ ----------' + @$(MAKE) -s toc_hyperref.pdf + @$(CP) -v toc_hyperref.pdf $@ -toc_hyperref.tex: toc_hyperref.tex.5th - $(CP) $< $@ +update: toc_hyperref.tex.6th.patch + @$(PATCH) <$< + +toc_hyperref.tex.6th.patch: + @$(MAKE) -s rebase + @$(DIFF) -u toc_hyperref.tex toc_hyperref.tex.6th >$@ || exit 0 + +rebase: + $(CMP) toc_hyperref.tex.5th toc_hyperref.tex || $(CP) -v toc_hyperref.tex.5th toc_hyperref.tex include latex.mk clean: tex-clean -distclean: tex-distclean +distclean: rebase tex-distclean + $(RM) *.patch + $(RM) toc_hyperref_*.pdf