summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/minidocument/Makefile
blob: 7ed82aab4ff4ef99712446df53aa2053c44365ac (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

PACKAGE := minidocument

TEXMFDIST:=$(shell kpsewhich -var-value TEXMFDIST)

all: sty doc

sty: $(PACKAGE).sty
$(PACKAGE).sty: $(PACKAGE).dtx $(PACKAGE).ins
	pdflatex ${PACKAGE}.ins

doc: $(PACKAGE).pdf
$(PACKAGE).pdf: $(PACKAGE).dtx
	pdflatex ${PACKAGE}.dtx
	makeindex -s gind.ist -o $(PACKAGE).ind $(PACKAGE).idx
	makeindex -s gglo.ist -o $(PACKAGE).gls $(PACKAGE).glo
	pdflatex ${PACKAGE}.dtx
	pdflatex ${PACKAGE}.dtx

install: $(PACKAGE).dtx $(PACKAGE).ins $(PACKAGE).sty README $(PACKAGE).pdf
	install -m 755 -d $(TEXMFDIST)/source/latex/$(PACKAGE)
	install -m 644 -t $(TEXMFDIST)/source/latex/$(PACKAGE) $(PACKAGE).dtx
	install -m 644 -t $(TEXMFDIST)/source/latex/$(PACKAGE) $(PACKAGE).ins
	install -m 755 -d $(TEXMFDIST)/tex/latex/$(PACKAGE)
	install -m 644 -t $(TEXMFDIST)/tex/latex/$(PACKAGE) $(PACKAGE).sty
	install -m 755 -d $(TEXMFDIST)/doc/latex/$(PACKAGE)
	install -m 644 -t $(TEXMFDIST)/doc/latex/$(PACKAGE) README
	install -m 644 -t $(TEXMFDIST)/doc/latex/$(PACKAGE) $(PACKAGE).pdf

dist: $(PACKAGE).tar.gz
$(PACKAGE).tar.gz: Makefile README $(PACKAGE).dtx $(PACKAGE).ins $(PACKAGE).pdf
	tar -cjf $@ --transform "s#^#$(PACKAGE)/#" $^