Skip to content

Commit

Permalink
platex.dtx, Makefile: build pldoc-en.pdf (WIP)
Browse files Browse the repository at this point in the history
  • Loading branch information
aminophen committed Jun 8, 2018
1 parent bab07a0 commit f4da24b
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 12 deletions.
21 changes: 18 additions & 3 deletions Makefile
@@ -1,7 +1,7 @@
STRIPTARGET = platex.ltx jarticle.cls pl209.def platexrelease.sty \
jltxdoc.cls
DOCTARGET = platex platexrelease pldoc exppl2e \
platex-en
platex-en pldoc-en
PDFTARGET = $(addsuffix .pdf,$(DOCTARGET))
DVITARGET = $(addsuffix .dvi,$(DOCTARGET))
KANJI = -kanji=jis
Expand Down Expand Up @@ -85,12 +85,12 @@ 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
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
rm ltxdoc.cfg pldoc.dic mkpldoc*.sh dstcheck.pl

exppl2e.dvi: exppl2e.sty
rm -f platex.cfg
Expand All @@ -108,6 +108,19 @@ platex-en.dvi: $(INTRODOC_SRC)
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
Expand All @@ -118,6 +131,8 @@ 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:
Expand Down
23 changes: 14 additions & 9 deletions platex.dtx
Expand Up @@ -1329,9 +1329,8 @@ all others indicate the places where it is used.}
%\fi
% \begin{macrocode}
%<*shprog>
for f in pldoc.toc pldoc.idx pldoc.glo ; do
if [ -e $f ]; then rm $f; fi
done
%<ja>rm -f pldoc.toc pldoc.idx pldoc.glo
%<en>rm -f pldoc-en.toc pldoc-en.idx pldoc-en.glo
% \end{macrocode}
%\ifJAPANESE
% $B$=$7$F!"(B\file{ltxdoc.cfg}$B$r6u$K$7$^$9!#(B
Expand All @@ -1349,7 +1348,8 @@ echo "" > ltxdoc.cfg
% Now process \file{pldoc.tex}.
%\fi
% \begin{macrocode}
platex pldoc.tex
%<ja>platex pldoc.tex
%<en>platex -jobname=pldoc-en pldoc.tex
% \end{macrocode}
%\ifJAPANESE
% $B:w0z$HJQ99MzNr$r:n@.$7$^$9!#(B
Expand Down Expand Up @@ -1380,8 +1380,10 @@ platex pldoc.tex
% in dictionaries. (Makeindex does not have this option.)
%\fi
% \begin{macrocode}
mendex -s gind.ist -d pldoc.dic -o pldoc.ind pldoc.idx
mendex -f -s gglo.ist -o pldoc.gls pldoc.glo
%<ja>mendex -s gind.ist -d pldoc.dic -o pldoc.ind pldoc.idx
%<en>mendex -s gind.ist -d pldoc.dic -o pldoc-en.ind pldoc-en.idx
%<ja>mendex -f -s gglo.ist -o pldoc.gls pldoc.glo
%<en>mendex -f -s gglo.ist -o pldoc-en.gls pldoc-en.glo
% \end{macrocode}
%\ifJAPANESE
% \file{ltxdoc.cfg}$B$NFbMF$r(B|\includeonly{}|$B$K$7!"(B\file{pldoc.tex}$B$r=hM}$7$^$9!#(B
Expand All @@ -1398,7 +1400,8 @@ mendex -f -s gglo.ist -o pldoc.gls pldoc.glo
%\fi
% \begin{macrocode}
echo "\includeonly{}" > ltxdoc.cfg
platex pldoc.tex
%<ja>platex pldoc.tex
%<en>platex -jobname=pldoc-en pldoc.tex
% \end{macrocode}
%\ifJAPANESE
% $B:G8e$K!":F$S(B\file{ltxdoc.cfg}$B$r6u$K$7$F!"(B\file{pldoc.tex}$B$r=hM}$r$7$^$9!#(B
Expand All @@ -1410,7 +1413,8 @@ platex pldoc.tex
%\fi
% \begin{macrocode}
echo "" > ltxdoc.cfg
platex pldoc.tex
%<ja>platex pldoc.tex
%<en>platex -jobname=pldoc-en pldoc.tex
# EOT
%</shprog>
% \end{macrocode}
Expand Down Expand Up @@ -1650,7 +1654,8 @@ exit;
% \begin{macrocode}
\generate{
\file{dstcheck.pl}{\from{platex.dtx}{plprog}}
\file{mkpldoc.sh}{\from{platex.dtx}{shprog}}
\file{mkpldoc.sh}{\from{platex.dtx}{shprog,ja}}
\file{mkpldoc-en.sh}{\from{platex.dtx}{shprog,en}}
}
\endbatchfile
%</Xins>
Expand Down

0 comments on commit f4da24b

Please sign in to comment.