-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
executable file
·116 lines (95 loc) · 3.57 KB
/
Makefile
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
111
112
113
114
115
116
SRC = beamerthemeiis
TEXVER = 2011
VIEWPDF = okular
EX = example
FEATURES = index history
## Directory to be used when creating an archive containing all the files
## required for the usage of the beamer theme.
OUTP = iisbeamer
## Determine the host the Makefile is running on.
HOST = $(shell hostname)
## Determine the path to the pdflatex binary depending on the current host.
ifeq ($(HOST),muem_mobile)
## Path to the latex/pdflatex binary for my cygwin installation on my laptop.
LATEX = "/cygdrive/c/Program Files/MiKTeX 2.9/miktex/bin/x64/latex.exe"
PDFLATEX = "/cygdrive/c/Program Files/MiKTeX 2.9/miktex/bin/x64/pdflatex.exe"
MAKEINDEX = "/cygdrive/c/Program Files/MiKTeX 2.9/miktex/bin/x64/makeindex.exe"
else
## Otherwise we assume that we are running this Makefile on my work PC.
LATEX = latex-$(TEXVER)
PDFLATEX = pdflatex-$(TEXVER)
MAKEINDEX = makeindex-$(TEXVER)
endif
.PHONY: help clean
all: sty doc $(FEATURES) example
@$(PDFLATEX) $(SRC).dtx
$(SRC).sty: $(SRC).dtx $(SRC).ins
@$(LATEX) $(SRC).ins
$(SRC).pdf: $(SRC).dtx
@$(PDFLATEX) $(SRC).dtx
sty: $(SRC).sty
doc: $(SRC).pdf
example: $(EX).pdf
## A pattern rule to create a PDF from a TEX source (only used for the example).
%.pdf: %.tex
@$(PDFLATEX) $(EX) $<
@$(PDFLATEX) $(EX) $<
## Targets to build the history.
history: $(SRC).gls $(SRC).ilg
$(SRC).glo $(SRC).aux: $(SRC).dtx
@$(PDFLATEX) $(SRC).dtx
$(SRC).gls: $(SRC).dtx $(SRC).glo
@$(MAKEINDEX) -s gglo.ist -o $(SRC).gls $(SRC).glo
## Targets to build the index.
index: $(SRC).ind $(SRC).ilg
$(SRC).idx $(SRC).nlo: $(SRC).dtx
@$(PDFLATEX) $(SRC).dtx
$(SRC).ind $(SRC).ilg: $(SRC).dtx $(SRC).idx
@$(MAKEINDEX) -s gind.ist -o $(SRC).ind $(SRC).idx
view:
$(VIEWPDF) $(SRC).pdf &
tar:
@make -B
@mkdir $(OUTP)
@cp $(SRC).sty $(OUTP)/$(SRC).sty
@cp beamerouterthemeiis.sty $(OUTP)/beamerouterthemeiis.sty
@cp beamerinnerthemeiis.sty $(OUTP)/beamerinnerthemeiis.sty
@cp beamercolorthemeiis.sty $(OUTP)/beamercolorthemeiis.sty
@cp beamerfontthemeiis.sty $(OUTP)/beamerfontthemeiis.sty
@cp eth_logo.pdf $(OUTP)/eth_logo.pdf
@cp eth_logo_neg.pdf $(OUTP)/eth_logo_neg.pdf
@cp wafer.jpg $(OUTP)/wafer.png
@cp example.tex $(OUTP)/example.tex
@cp example.pdf $(OUTP)/example.pdf
@cp wafer.jpg $(OUTP)/wafer.jpg
@cp wafer.png $(OUTP)/wafer.png
@cp Makefile_example $(OUTP)/Makefile
@tar -czf $(OUTP).tar.gz $(OUTP)/
@rm -rf $(OUTP)
@echo "### Archive containing IIS beamer template created: $(OUTP).tar.gz"
clean:
@rm -f *.log *~ *.aux *.glo *.gls *.idx *.ilg *.ind
@rm -f *.out *.tdo *.toc *.sty *.nav *.snm *.vrb $(SRC).pdf
@rm -rf $(OUTP) $(OUTP).tar.gz
help:
@echo
@echo "USAGE : make [options] <target(s)>"
@echo
@echo "TARGETS : help - Show the help (this text)."
@echo
@echo " (default) - Call 'all' target"
@echo " all - Create theme files, documentation, and example"
@echo " sty - Create theme files"
@echo " doc - Create theme documentation"
@echo " history - Create theme history"
@echo " index - Create theme index"
@echo " example - Create example file"
@echo " tar - Create an archive containing all files required for the theme"
@echo " clean - Clean directory"
@echo
@echo "OPTIONS : -B - Always build (regardless of whether the dependencies"
@echo " are outdated or not)."
@echo
@echo "EXAMPLEs : make"
@echo " make example"
@echo