X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=latex_mk%2Ftest%2Ftoc_hyperref%2FMakefile;fp=latex_mk%2Ftest%2Ftoc_hyperref%2FMakefile;h=79d954652195bf736ebfa0dbe3a91011e452f5f6;hb=304f12a38e1b83b3295c5c11d90e889ccc825c78;hp=43136fb81c11ca94a0a303a19971799cd5ae5836;hpb=fdfe12a7e234face5ff58b9fadc5360755347dba;p=makefiles.git diff --git a/latex_mk/test/toc_hyperref/Makefile b/latex_mk/test/toc_hyperref/Makefile index 43136fb..79d9546 100644 --- a/latex_mk/test/toc_hyperref/Makefile +++ b/latex_mk/test/toc_hyperref/Makefile @@ -1,20 +1,40 @@ TEXTARGETS := toc_hyperref.pdf -.PHONY: all toc-update body-update rebase clean distclean +CMP := cmp -s +DIFF := diff +PATCH := patch -all: $(TEXTARGETS) +.PHONY: all update rebase clean distclean -toc-update: - $(CP) toc_hyperref.tex.6th toc_hyperref.tex +all: + @$(MAKE) -s toc_hyperref_1.pdf + @$(ECHO) '--------------------' + @$(MAKE) -s toc_hyperref_2.pdf -body-update: - $(CP) toc_hyperref.tex.5th_add 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 $@ + +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: - $(CP) toc_hyperref.tex.5th toc_hyperref.tex + $(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 rebase +distclean: rebase tex-distclean + $(RM) *.patch + $(RM) toc_hyperref_*.pdf