summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/familytree/doc-ja/figs/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/familytree/doc-ja/figs/Makefile')
-rw-r--r--macros/latex/contrib/familytree/doc-ja/figs/Makefile74
1 files changed, 74 insertions, 0 deletions
diff --git a/macros/latex/contrib/familytree/doc-ja/figs/Makefile b/macros/latex/contrib/familytree/doc-ja/figs/Makefile
new file mode 100644
index 0000000000..a145c5ccd1
--- /dev/null
+++ b/macros/latex/contrib/familytree/doc-ja/figs/Makefile
@@ -0,0 +1,74 @@
+
+Dir ?= /tmp
+export Dir
+
+LATEX ?= platex -kanji=euc
+include ../../cmd.mk
+Lo = '\def\Dir{'${Dir}'}'
+
+Fig = fig1base fig1Ieyasu fig1Hidetada
+Fig += fig2base-ja fig2Hidetada fig2ival-ja fig2cfg
+Fig += fig3Hidetada fig3Ietsuna fig3Iemitsu
+Fig += fig4Hidetada fig4Ogou
+figLily = $(addprefix fig3Lily, 1 2 3 4) $(addprefix fig4Lily, 1 2 3 4)
+
+figTY = $(addsuffix T, ${Fig}) $(addsuffix Y, ${Fig})
+figTYPdf = $(addprefix ${Dir}/, $(addsuffix .pdf, ${figTY}))
+figPdf = $(addprefix ${Dir}/, $(addsuffix .pdf, ${Fig}))
+figPrint = $(addprefix ${Dir}/, $(addsuffix print.tex, ${Fig}))
+
+figLilyPdf = $(addprefix ${Dir}/, $(addsuffix .pdf, ${figLily}))
+figLilyPrint = $(addprefix ${Dir}/, $(addsuffix print.tex, ${figLily}))
+
+Tgt = ${figPdf} ${figPrint}
+
+########################################
+
+all: ${Tgt}
+
+clean:
+ ${RM} *~ ${Tgt}
+
+install:
+# do nothing
+
+########################################
+
+fig: ${figPdf}
+${figTYPdf}: Lo += '\def\figsrc{$(basename $<)}'
+${Dir}/%T.pdf: Lo += '\newif\ifmaketate\maketatetrue'
+${Dir}/%Y.pdf: Lo += '\newif\ifmaketate\maketatefalse'
+${Dir}/%T.pdf: %.tex figTY-ja.tex ${Dir}/${Name}.sty
+ $(call MakeFigPdf,$(basename $@),figTY-ja)
+ ebb $@
+${Dir}/%Y.pdf: %.tex figTY-ja.tex ${Dir}/${Name}.sty
+ $(call MakeFigPdf,$(basename $@),figTY-ja)
+ ebb $@
+
+${figPdf}: Lo = '\def\figsrc{$(notdir $(basename $@))}'
+${figPdf}: ${Dir}/%.pdf: fig-ja.tex ${Dir}/%T.pdf ${Dir}/%Y.pdf
+ $(call MakeFigPdf,$(basename $@),fig-ja)
+
+########################################
+
+untilComment = $(addprefix ${Dir}/, $(addsuffix print.tex, \
+ fig1Ieyasu fig2Hidetada fig3Hidetada fig4Hidetada))
+${untilComment}: ${Dir}/%print.tex: %.tex
+ sed -e '/^%$$/,$$d' $< | grep -v '^%' > $@
+
+noIndvdl = $(addprefix ${Dir}/, $(addsuffix print.tex, \
+ fig2ival-ja fig2cfg))
+${noIndvdl}: ${Dir}/%print.tex: %.tex
+ fgrep -vw indvdldef $< |\
+ fgrep -vx '' |\
+ $(call MakePrintTex, -) > $@
+
+# they should be already generated by upper make
+# ${figLilyPdf} ${figLilyPrint}:
+
+${Dir}/%Tprint.tex ${Dir}/%Yprint.tex: ${Dir}/%print.tex
+ cp -p $< $@
+${Dir}/%print.tex: %.tex
+ $(call MakePrintTex, $<) > $@
+
+-include priv.mk