summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/platex/base/Makefile
blob: ac45cee9c1331c68e87b5bc7c4b6f7eb8eb9bc35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
STRIPTARGET = platex.ltx jarticle.cls pl209.def platexrelease.sty \
	jltxdoc.cls
DOCTARGET = platex platexrelease pldoc exppl2e \
	platex-en #pldoc-en
PDFTARGET = $(addsuffix .pdf,$(DOCTARGET))
DVITARGET = $(addsuffix .dvi,$(DOCTARGET))
KANJI = -kanji=jis
FONTMAP = -f ipaex.map -f ptex-ipaex.map
TEXMF = $(shell kpsewhich -var-value=TEXMFHOME)

default: $(STRIPTARGET) $(DVITARGET)
strip: $(STRIPTARGET)
all: $(STRIPTARGET) $(PDFTARGET)

PLFMT = platex.ltx plcore.ltx kinsoku.tex pldefs.ltx \
	jy1mc.fd jy1gt.fd jt1mc.fd jt1gt.fd plext.sty \
	ptrace.sty pfltrace.sty

PLFMT_SRC = platex.dtx plvers.dtx plfonts.dtx plcore.dtx \
	kinsoku.dtx plext.dtx

PLCLS = jarticle.cls jreport.cls jbook.cls jsize10.clo \
	jsize11.clo jsize12.clo jbk10.clo jbk11.clo jbk12.clo \
	tarticle.cls treport.cls tbook.cls tsize10.clo \
	tsize11.clo tsize12.clo tbk10.clo tbk11.clo tbk12.clo

PLCLS_SRC = jclasses.dtx

PL209 = pl209.def oldpfont.sty jarticle.sty tarticle.sty \
	jbook.sty tbook.sty jreport.sty treport.sty

PL209_SRC = pl209.dtx

PLREL = platexrelease.sty

PLREL_SRC = platexrelease.dtx $(PLFMT_SRC)

INTRODOC_SRC = platex.dtx

PLRELDOC_SRC = platexrelease.dtx

PLDOC_SRC = platex.dtx plvers.dtx plfonts.dtx plcore.dtx plext.dtx \
	pl209.dtx kinsoku.dtx jclasses.dtx jltxdoc.dtx

platex.ltx: $(PLFMT_SRC)
	rm -f $(PLFMT)
	platex $(KANJI) plfmt.ins
	rm plfmt.log

jarticle.cls: $(PLCLS_SRC)
	rm -f $(PLCLS)
	platex $(KANJI) plcls.ins
	rm plcls.log

pl209.def: $(PL209_SRC)
	rm -f $(PL209)
	platex $(KANJI) pl209.ins
	rm pl209.log

platexrelease.sty: $(PLREL_SRC)
	rm -f $(PLREL)
	platex $(KANJI) platexrelease.ins
	rm platexrelease.log

jltxdoc.cls: jltxdoc.dtx
	rm -f jltxdoc.cls pldoc.tex Xins.ins
	platex $(KANJI) pldocs.ins
	rm pldocs.log pldoc.tex Xins.ins

platex.dvi: $(INTRODOC_SRC)
	rm -f platex.cfg
	platex $(KANJI) platex.dtx
	mendex -J -f -s gglo.ist -o platex.gls platex.glo
	platex $(KANJI) platex.dtx
	rm platex.aux platex.log
	rm platex.glo platex.gls platex.ilg

platexrelease.dvi: $(PLRELDOC_SRC)
	rm -f platex.cfg
	platex $(KANJI) platexrelease.dtx
	platex $(KANJI) platexrelease.dtx
	rm platexrelease.aux platexrelease.log

pldoc.dvi: $(PLDOC_SRC)
	rm -f platex.cfg
	rm -f jltxdoc.cls pldoc.tex Xins.ins
	platex $(KANJI) pldocs.ins
	rm -f mkpldoc*.sh dstcheck.pl
	platex $(KANJI) Xins.ins
	sh mkpldoc.sh
	rm *.aux *.log pldoc.toc pldoc.idx pldoc.ind pldoc.ilg
	rm pldoc.glo pldoc.gls pldoc.tex Xins.ins
	rm ltxdoc.cfg pldoc.dic mkpldoc*.sh dstcheck.pl

exppl2e.dvi: exppl2e.sty
	rm -f platex.cfg
	platex $(KANJI) exppl2e.sty
	platex $(KANJI) exppl2e.sty
	rm exppl2e.aux exppl2e.log

platex-en.dvi: $(INTRODOC_SRC)
	# built-in echo in shell is troublesome, so use perl instead
	perl -e "print \"\\\\newif\\\\ifJAPANESE\\n"\" >platex.cfg
	platex -jobname=platex-en $(KANJI) platex.dtx
	mendex -J -f -s gglo.ist -o platex-en.gls platex-en.glo
	platex -jobname=platex-en $(KANJI) platex.dtx
	rm platex-en.aux platex-en.log
	rm platex-en.glo platex-en.gls platex-en.ilg
	rm platex.cfg

pldoc-en.dvi: $(PLDOC_SRC)
	# built-in echo in shell is troublesome, so use perl instead
	perl -e "print \"\\\\newif\\\\ifJAPANESE\\n"\" >platex.cfg
	rm -f jltxdoc.cls pldoc.tex Xins.ins
	platex $(KANJI) pldocs.ins
	rm -f mkpldoc*.sh dstcheck.pl
	platex $(KANJI) Xins.ins
	sh mkpldoc-en.sh
	rm *.aux *.log pldoc-en.toc pldoc-en.idx pldoc-en.ind pldoc-en.ilg
	rm pldoc-en.glo pldoc-en.gls pldoc.tex Xins.ins
	rm ltxdoc.cfg pldoc.dic mkpldoc*.sh dstcheck.pl
	rm platex.cfg

platex.pdf: platex.dvi
	dvipdfmx $(FONTMAP) $<
platexrelease.pdf: platexrelease.dvi
	dvipdfmx $(FONTMAP) $<
pldoc.pdf: pldoc.dvi
	dvipdfmx $(FONTMAP) $<
exppl2e.pdf: exppl2e.dvi
	dvipdfmx $(FONTMAP) $<
platex-en.pdf: platex-en.dvi
	dvipdfmx $(FONTMAP) $<
pldoc-en.pdf: pldoc-en.dvi
	dvipdfmx $(FONTMAP) $<

.PHONY: install clean cleanstrip cleanall cleandoc
install:
	mkdir -p ${TEXMF}/doc/platex/base
	cp ./LICENSE ${TEXMF}/doc/platex/base/
	cp ./README.md ${TEXMF}/doc/platex/base/
	cp ./*.pdf ${TEXMF}/doc/platex/base/
#	cp ./*.txt ${TEXMF}/doc/platex/base/
	mkdir -p ${TEXMF}/source/platex/base
	cp ./Makefile ${TEXMF}/source/platex/base/
	cp ./plnews*.tex ${TEXMF}/source/platex/base/
	cp ./*.dtx ${TEXMF}/source/platex/base/
	cp ./*.ins ${TEXMF}/source/platex/base/
	mkdir -p ${TEXMF}/tex/platex/base
	cp ./kinsoku.tex ${TEXMF}/tex/platex/base/
	cp ./*.clo ${TEXMF}/tex/platex/base/
	cp ./*.cls ${TEXMF}/tex/platex/base/
	cp ./*.def ${TEXMF}/tex/platex/base/
	cp ./*.fd  ${TEXMF}/tex/platex/base/
	cp ./*.ltx ${TEXMF}/tex/platex/base/
	cp ./*.sty ${TEXMF}/tex/platex/base/
	mkdir -p ${TEXMF}/tex/platex/config
	cp ./platex.ini ${TEXMF}/tex/platex/config/
clean:
	rm -f $(PLFMT) $(PLCLS) $(PL209) $(PLREL) \
	$(DVITARGET) \
	jltxdoc.cls pldoc.tex Xins.ins
cleanstrip:
	rm -f $(PLFMT) $(PLCLS) $(PL209) $(PLREL) \
	jltxdoc.cls pldoc.tex Xins.ins
cleanall:
	rm -f $(PLFMT) $(PLCLS) $(PL209) $(PLREL) \
	$(DVITARGET) $(PDFTARGET) \
	jltxdoc.cls pldoc.tex Xins.ins
cleandoc:
	rm -f $(DVITARGET) $(PDFTARGET)