summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/disser/Makefile
blob: 5fb3559a31a1ab131bc0ddf1b7ec2a53083102fb (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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
#
# Makefile for disser package
# Author: Stanislav Kruchinin <stanislav.kruchinin@gmail.com>
# 

TARGET=disser
SUBCLASS=gost732
BST=disser-bst
MANUAL=manual

CLSFILES=$(TARGET).cls *.rtx $(SUBCLASS).cls
BSTFILES=$(TARGET).bst $(TARGET)-s.bst
DOCFILES=$(TARGET).pdf $(SUBCLASS).pdf $(BST).pdf $(MANUAL).pdf
TEXTFILES=../README ../README.ru ../ChangeLog
SRCFILES=*.dtx *.ins $(MANUAL).tex

TEXMF?=/usr/share/texmf

CLSDIR?=$(TEXMF)/tex/latex/$(TARGET)
DOCDIR?=$(TEXMF)/doc/latex/$(TARGET)
BSTDIR?=$(TEXMF)/bibtex/bst/$(TARGET)
SRCDIR?=$(TEXMF)/source/latex/$(TARGET)

CLEXT?=*.log *.out *.aux *.dvi *.idx *.ilg *.ind *.glo *.toc *.bak *.bbl *.blg *.sav
CLFILES?=$(CLSFILES) $(BSTFILE) $(DOCFILES) $(CLEXT)

LATEX?=latex
PDFLATEX?=pdflatex
MI?=makeindex

LATEXFLAGS?=
PDFLATEXFLAGS?=

all: package doc

package: $(TARGET).ins
	$(LATEX) $^

doc: pdf

dvi: $(TARGET).dvi $(SUBCLASS).dvi $(BST).dvi $(MANUAL).dvi

pdf: $(TARGET).pdf $(SUBCLASS).pdf $(BST).pdf $(MANUAL).pdf

install: all
	mkdir -p $(CLSDIR)
	mkdir -p $(BSTDIR)
	mkdir -p $(DOCDIR)
	mkdir -p $(SRCDIR)
	cp $(CLSFILES)  $(CLSDIR)
	cp $(BSTFILES)  $(BSTDIR)
	cp $(DOCFILES)  $(DOCDIR)
	cp $(TEXTFILES) $(DOCDIR)
	cp $(SRCFILES)  $(SRCDIR)

uninstall:
	rm $(addprefix $(CLSDIR)/, $(CLSFILES))
	rm $(addprefix $(BSTDIR)/, $(BSTFILES))
	rm $(addprefix $(DOCDIR)/, $(DOCFILES))
	rm $(addprefix $(DOCDIR)/, $(notdir $(TEXTFILES)))
	rm $(addprefix $(SRCDIR)/, $(SRCFILES))
	rmdir $(CLSDIR)
	rmdir $(BSTDIR)
	rmdir $(DOCDIR)
	rmdir $(SRCDIR)

reinstall: uninstall install

clean:
	rm -f $(CLFILES)

disser.dvi: disser.dtx
	$(LATEX) $(LATEXFLAGS) $<
	$(MI) -r $(TARGET)
	$(LATEX) $(LATEXFLAGS) $<
	$(LATEX) $(LATEXFLAGS) $<

disser.pdf: disser.dtx
	$(PDFLATEX) $(PDFLATEXFLAGS) $<
	$(MI) -r $(TARGET)
	$(PDFLATEX) $(PDFLATEXFLAGS) $<
	$(PDFLATEX) $(PDFLATEXFLAGS) $<

%.dvi: %.dtx
	$(LATEX) $(LATEXFLAGS) $<
	$(LATEX) $(LATEXFLAGS) $<

%.dvi: %.tex
	$(LATEX) $(LATEXFLAGS) $<
	$(LATEX) $(LATEXFLAGS) $<

%.pdf: %.dtx
	$(PDFLATEX) $(PDFLATEXFLAGS) $<
	$(PDFLATEX) $(PDFLATEXFLAGS) $<

%.pdf: %.tex
	$(PDFLATEX) $(PDFLATEXFLAGS) $<
	$(PDFLATEX) $(PDFLATEXFLAGS) $<

help:
	@echo "  all        (default) build package files and documentation"
	@echo "  package    build package"
	@echo "  clean      remove output files"
	@echo "  doc        build DVI and PDF versions of documentation"
	@echo "  dvi        build DVI version of documentation"
	@echo "  help       show description of targets"
	@echo "  install    install package and documentation"
	@echo "  pdf        build PDF version of documentation"
	@echo "  reinstall  reinstall package and documentation"
	@echo "  uninstall  uninstall package and documentation"