projects
/
makefiles.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
テスト用ファイルの整理
[makefiles.git]
/
latex_mk
/
test
/
toc_hyperref
/
Makefile
diff --git
a/latex_mk/test/toc_hyperref/Makefile
b/latex_mk/test/toc_hyperref/Makefile
index
170b540
..
79d9546
100644
(file)
--- a/
latex_mk/test/toc_hyperref/Makefile
+++ b/
latex_mk/test/toc_hyperref/Makefile
@@
-1,20
+1,40
@@
TEXTARGETS := toc_hyperref.pdf
TEXTARGETS := toc_hyperref.pdf
+CMP := cmp -s
+DIFF := diff
+PATCH := patch
+
.PHONY: all update rebase clean distclean
.PHONY: all update rebase clean distclean
-all: $(TEXTARGETS)
+all:
+ @$(MAKE) -s toc_hyperref_1.pdf
+ @$(ECHO) '--------------------'
+ @$(MAKE) -s toc_hyperref_2.pdf
-update: toc_hyperref.tex
- $(CP) toc_hyperref.tex.6th toc_hyperref.tex
+toc_hyperref_1.pdf: rebase
+ @$(ECHO) '---------- $@: $^ ----------'
+ @$(MAKE) -s toc_hyperref.pdf
+ @$(CP) -v toc_hyperref.pdf $@
-rebase:
- $(CP) toc_hyperref.tex.5th toc_hyperref.tex
+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: toc_hyperref.tex.5th
- $(CP) $< $@
+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
include latex.mk
clean: tex-clean
-distclean: tex-distclean
+distclean: rebase tex-distclean
+ $(RM) *.patch
+ $(RM) toc_hyperref_*.pdf