summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/schemata/Makefile
blob: b10f10c47b47261b8a066510a045a5dd73d941da (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
NAME  = schemata
SHELL = bash
PWD   = $(shell pwd)
VERS  = $(shell ltxfileinfo -v $(NAME).dtx|sed -e 's/^v//')
LOCAL = $(shell kpsewhich --var-value TEXMFLOCAL)
UTREE = $(shell kpsewhich --var-value TEXMFHOME)
all:	$(NAME).pdf
	test -e README.txt && mv README.txt README || exit 0
$(NAME).pdf: $(NAME).dtx
	pdflatex -shell-escape -recorder -interaction=batchmode $(NAME).dtx >/dev/null
	pdflatex --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null
	if [ -f $(NAME).glo ]; then makeindex -q -s gglo.ist -o $(NAME).gls $(NAME).glo; fi
	if [ -f $(NAME).idx ]; then makeindex -q -s gind.ist -o $(NAME).ind $(NAME).idx; fi
	pdflatex --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null
	pdflatex --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null
clean:
	rm -f $(NAME).{aux,fls,glo,gls,hd,idx,ilg,ind,ins,log,out,toc} README.txt
distclean: clean
	rm -f $(NAME).{pdf,sty} README
inst: all
	mkdir -p $(UTREE)/{tex,source,doc}/generic/$(NAME)
	cp $(NAME).dtx $(UTREE)/source/generic/$(NAME)
	cp Makefile $(UTREE)/source/generic/$(NAME)
	cp $(NAME).sty $(UTREE)/tex/generic/$(NAME)
	cp $(NAME).pdf $(UTREE)/doc/generic/$(NAME)
install: all
	sudo mkdir -p $(LOCAL)/{tex,source,doc}/generic/$(NAME)
	sudo cp $(NAME).dtx $(LOCAL)/source/generic/$(NAME)
	sudo cp Makefile $(LOCAL)/source/generic/$(NAME)
	sudo cp $(NAME).sty $(LOCAL)/tex/generic/$(NAME)
	sudo cp $(NAME).pdf $(LOCAL)/doc/generic/$(NAME)
zip: all
	ln -sf . $(NAME)
	zip -Drq $(PWD)/$(NAME)-$(VERS).zip $(NAME)/{README,Makefile,$(NAME).{pdf,dtx}}
	rm $(NAME)