summaryrefslogtreecommitdiff
path: root/info/mendex-doc/Makefile
blob: 881f227bb27b6797d46937b8f956cdeb58723f71 (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
DOCTARGET = mendex
PDFTARGET = $(addsuffix .pdf,$(DOCTARGET))
DVITARGET = $(addsuffix .dvi,$(DOCTARGET))
KANJI = -kanji=utf8
#FONTMAP = -f ipaex.map -f ptex-ipaex.map
FONTMAP = -f haranoaji.map -f ptex-haranoaji.map -f otf-haranoaji.map
TEXMF = $(shell kpsewhich -var-value=TEXMFHOME)
LTX = platex $(KANJI)
DPX = dvipdfmx $(FONTMAP)
MDX = mendex -U

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

.SUFFIXES: .tex .dvi .pdf
.tex.dvi:
	$(MDX) -h 2>mendex-version.log
	$(LTX) $<
	$(MDX) mendex-sub
	mv mendex-sub.ind mendex-sub-0.ind
	$(MDX) -s jpbase mendex-sub
	mv mendex-sub.ind mendex-sub-1.ind
	$(MDX) -g -s jpbase mendex-sub
	mv mendex-sub.ind mendex-sub-2.ind
	$(MDX) -g -s jpbase -s mendex-sub-3 mendex-sub
	mv mendex-sub.ind mendex-sub-3.ind
	$(MDX) -g -s jpbase -s mendex-sub-4 mendex-sub
	mv mendex-sub.ind mendex-sub-4.ind
	$(MDX) -g -l -s jpbase mendex-sub
	mv mendex-sub.ind mendex-sub-5.ind
	$(LTX) $<
	$(LTX) $<
	rm -f *.aux *.log *.toc *.out *.idx *.ind *.ilg *-sub-*.ist
.dvi.pdf:
	$(DPX) $<

.PHONY: install clean
install:
	mkdir -p ${TEXMF}/doc/support/mendex
	cp ./LICENSE ${TEXMF}/doc/support/mendex/
	cp ./README* ${TEXMF}/doc/support/mendex/
	cp ./Makefile ${TEXMF}/doc/support/mendex/
	cp ./*.tex ${TEXMF}/doc/support/mendex/
	cp ./*.pdf ${TEXMF}/doc/support/mendex/
	mkdir -p ${TEXMF}/makeindex/mendex
	cp ./*.ist ${TEXMF}/makeindex/mendex/
clean:
	rm -f $(DVITARGET) $(PDFTARGET)