summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/ascmac/Makefile
blob: 06c631d4d3c5d8011de62d9e56505e7bb5ffb74a (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
STRIPTARGET = tascmac.sty
DOCTARGET = ascmac
PDFTARGET = $(addsuffix .pdf,$(DOCTARGET))
DVITARGET = $(addsuffix .dvi,$(DOCTARGET))
KANJI = -kanji=utf8
FONTMAP = -f ipaex.map -f ptex-ipaex.map
TEXMF = $(shell kpsewhich -var-value=TEXMFHOME)

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

ASCMAC = tascmac.sty ascmac.sty

ASCMAC_SRC = ascmac.dtx

# for generating files, we use pdflatex incidentally.
# current packages contain ASCII characters only, safe enough
tascmac.sty: $(ASCMAC_SRC)
	rm -f $(ASCMAC)
	pdflatex ascmac.ins
	rm ascmac.log

ascmac.dvi: $(ASCMAC_SRC)
	rm -f platex.cfg
	platex $(KANJI) ascmac.dtx
	platex $(KANJI) ascmac.dtx
	rm ascmac.aux ascmac.log ascmac.toc

ascmac.pdf: ascmac.dvi
	dvipdfmx $(FONTMAP) $<

.PHONY: install clean cleanstrip cleanall cleandoc
install:
	mkdir -p ${TEXMF}/doc/latex/ascmac
	cp ./LICENSE ${TEXMF}/doc/latex/ascmac/
	cp ./README.md ${TEXMF}/doc/latex/ascmac/
	cp ./*.pdf ${TEXMF}/doc/latex/ascmac/
	mkdir -p ${TEXMF}/fonts/source/public/ascmac
	cp ./*.mf ${TEXMF}/fonts/source/public/ascmac/
	mkdir -p ${TEXMF}/fonts/type1/public/ascmac
	cp ./*.pfb ${TEXMF}/fonts/type1/public/ascmac/
	mkdir -p ${TEXMF}/fonts/tfm/public/ascmac
	cp ./*.tfm ${TEXMF}/fonts/tfm/public/ascmac/
	mkdir -p ${TEXMF}/source/latex/ascmac
	cp ./Makefile ${TEXMF}/source/latex/ascmac/
	cp ./*.dtx ${TEXMF}/source/latex/ascmac/
	cp ./*.ins ${TEXMF}/source/latex/ascmac/
	mkdir -p ${TEXMF}/tex/latex/ascmac
	cp ./*.sty ${TEXMF}/tex/latex/ascmac/
clean:
	rm -f $(ASCMAC) $(DVITARGET)
cleanstrip:
	rm -f $(ASCMAC)
cleanall:
	rm -f $(ASCMAC) $(DVITARGET) $(PDFTARGET)
cleandoc:
	rm -f $(DVITARGET) $(PDFTARGET)