blob: 1e6853ba43e98576052156741842ed68c279239a (
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
|
SOURCE_FILES := $(wildcard *.dtx)
DEST_FILES := $(shell grep '\\file' kauthesis.ins | sed 's/.*\\file{\([^}]*\)}.*/\1/')
DOC_FILES := $(foreach f, $(SOURCE_FILES), $(basename $(f)).pdf) kauguide.pdf
PACKAGE :=kau
TEXMF :=$(shell kpsexpand -n latex '$$TEXMFHOME')
LATEXDIR :=$(TEXMF)/tex/latex/$(PACKAGE)
LATEXDOC :=$(TEXMF)/doc/latex/$(PACKAGE)
EXTENSIONS := aux glo gls idx ilg ind log out toc
all: $(DEST_FILES)
doc: $(DOC_FILES)
install: $(DEST_FILES)
install -d $(LATEXDIR)
install -m 0644 $(DEST_FILES) $(LATEXDIR)
install_doc: $(DOC_FILES)
install -d $(LATEXDOC)
install -m 0644 $(DOC_FILES) $(LATEXDOC)
clean:
rm -f $(DOC_FILES) $(DEST_FILES)
$(DEST_FILES): kauthesis.ins $(SOURCE_FILES)
latex kauthesis.ins
rm -f kauthesis.log
%.pdf: %.dtx
pdflatex $<
makeindex -s gglo.ist -o $(basename $<).gls $(basename $<).glo
makeindex -s gind.ist -o $(basename $<).ind $(basename $<).idx
pdflatex $<
$(foreach e, $(EXTENSIONS), rm -f $(basename $<).$(e))
kauguide.pdf: kauguide.tex
pdflatex $<
makeindex -o $(basename $<).ind $(basename $<).idx
pdflatex $<
pdflatex $<
$(foreach e, $(EXTENSIONS), rm -f $(basename $<).$(e))
|