-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmiun.depend.mk
249 lines (185 loc) · 6.06 KB
/
miun.depend.mk
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
# $Id$
# Author: Daniel Bosk <daniel.bosk@miun.se>
ifndef MIUN_DEPEND_MK
MIUN_DEPEND_MK=true
CONF?= /etc/mk.conf
-include ${CONF}
CURRENT_URL=https://github.com/dbosk/miuntex/releases/download/v1.0
.PHONY: clean-depends distclean
### MIUN Miscellanous package and Logo ###
miunmisc-depend?= ${TEXMF}/tex/latex/miun/miunmisc/miunmisc.sty
logo-depend?= ${TEXMF}/tex/latex/miun/miunmisc/MU_logotyp_int_sv.eps \
${TEXMF}/tex/latex/miun/miunmisc/MU_logotyp_int_CMYK.eps
${miunmisc-depend} ${logo-depend}:
wget -O /tmp/miunmisc.tar.gz \
http://ver.miun.se/latex/packages/miunmisc.tar.gz
cd /tmp && tar -zxf miunmisc.tar.gz
cd /tmp/miunmisc && ${MAKE} install
MIUNMISC_FILES= MU_logotyp_int_CMYK.eps MU_logotyp_int_CMYK.pdf
MIUNMISC_FILES+= MU_logotyp_int_sv.eps MU_logotyp_int_sv.pdf
MIUNMISC_FILES+= miunmisc.sty miunmisc-Swedish.dict miunmisc-English.dict
${INCLUDE_MIUNTEX}/miunmisc/miunmisc.sty:
${MAKE} -C ${INCLUDE_MIUNTEX}/miunmisc miunmisc.sty
${INCLUDE_MIUNTEX}/miunmisc/miunmisc-Swedish.dict:
${MAKE} -C ${INCLUDE_MIUNTEX}/miunmisc miunmisc-Swedish.dict
${INCLUDE_MIUNTEX}/miunmisc/miunmisc-English.dict:
${MAKE} -C ${INCLUDE_MIUNTEX}/miunmisc miunmisc-English.dict
ifdef INCLUDE_MIUNTEX
$(foreach f,${MIUNMISC_FILES},$(eval $f: ${INCLUDE_MIUNTEX}/miunmisc/$f))
${MIUNMISC_FILES}:
ln -s $^ $@
else
${MIUNMISC_FILES}:
wget -O $@ ${CURRENT_URL}/$@
endif
.PHONY: miunmisc miunlogo
miunlogo: MU_logotyp_int_CMYK.eps MU_logotyp_int_CMYK.pdf
miunlogo: MU_logotyp_int_sv.eps MU_logotyp_int_sv.pdf
miunmisc: miunmisc.sty miunmisc-English.dict miunmisc-Swedish.dict
miunmisc: miunlogo
.PHONY: clean-miunmisc clean-miunlogo
clean-depends distclean: clean-miunmisc clean-miunlogo
clean-miunmisc: clean-tex
${RM} ${MIUNMISC_FILES}
${RM} miunmisc.sty miunmisc-English.dict miunmisc-Swedish.dict
clean-miunlogo:
${RM} MU_logotyp_int_CMYK.eps MU_logotyp_int_CMYK.pdf
${RM} MU_logotyp_int_sv.eps MU_logotyp_int_sv.pdf
### MIUN Article class ###
miunart-depend?= ${TEXMF}/tex/latex/miun/miunart/miunart.sty
${miunart-depend}:
wget -O /tmp/miunart.tar.gz \
http://ver.miun.se/latex/packages/miunart.tar.gz
cd /tmp && tar -zxf miunart.tar.gz
cd /tmp/miunart && ${MAKE} install
MIUNART_FILES= miunart.cls miunart-English.dict miunart-Swedish.dict
ifdef INCLUDE_MIUNTEX
$(foreach f,${MIUNART_FILES},$(eval $f: ${INCLUDE_MIUNTEX}/miunart/$f))
${MIUNART_FILES}:
ln -s $^ $@
else
${MIUNART_FILES}:
wget -O $@ ${CURRENT_URL}/$@
endif
.PHONY: miunart
miunart: ${MIUNART_FILES} miunlogo
.PHONY: clean-miunart
clean-depends distclean: clean-miunart
clean-miunart:
${RM} ${MIUNART_FILES}
### MIUN Assignment class ###
miunasgn-depend?= ${TEXMF}/tex/latex/miun/miunasgn/miunasgn.sty
${miunasgn-depend}:
wget -O /tmp/miunasgn.tar.gz \
http://ver.miun.se/latex/packages/miunasgn.tar.gz
cd /tmp && tar -zxf miunasgn.tar.gz
cd /tmp/miunasgn && ${MAKE} install
MIUNASGN_FILES= miunasgn.cls miunasgn-English.dict miunasgn-Swedish.dict
ifdef INCLUDE_MIUNTEX
$(foreach f,${MIUNASGN_FILES},$(eval $f: ${INCLUDE_MIUNTEX}/miunasgn/$f))
${MIUNASGN_FILES}:
ln -s $^ $@
else
${MIUNASGN_FILES}:
wget -O $@ ${CURRENT_URL}/$@
endif
.PHONY: miunasgn
miunasgn: ${MIUNASGN_FILES} miunlogo
.PHONY: clean-miunasgn
clean-depends distclean: clean-miunasgn
clean-miunasgn:
${RM} ${MIUNASGN_FILES}
### MIUN Exam class ###
miunexam-depend?= ${TEXMF}/tex/latex/miun/miunexam/miunexam.sty
${miunexam-depend}:
wget -O /tmp/miunexam.tar.gz \
http://ver.miun.se/latex/packages/miunexam.tar.gz
cd /tmp && tar -zxf miunexam.tar.gz
cd /tmp/miunexam && ${MAKE} install
MIUNEXAM_FILES= miunexam.cls miunexam-English.dict miunexam-Swedish.dict
ifdef INCLUDE_MIUNTEX
$(foreach f,${MIUNEXAM_FILES},$(eval $f: ${INCLUDE_MIUNTEX}/miunexam/$f))
${MIUNEXAM_FILES}:
ln -s $^ $@
else
${MIUNEXAM_FILES}:
wget -O $@ ${CURRENT_URL}/$@
endif
.PHONY: miunexam
miunexam: ${MIUNEXAM_FILES} miunlogo
.PHONY: clean-miunexam
clean-depends distclean: clean-miunexam
clean-miunexam:
${RM} ${MIUNEXAM_FILES}
### MIUN Letter class ###
miunlett-depend?= ${TEXMF}/tex/latex/miun/miunlett/miunlett.sty
${miunlett-depend}:
wget -O /tmp/miunlett.tar.gz \
http://ver.miun.se/latex/packages/miunlett.tar.gz
cd /tmp && tar -zxf miunlett.tar.gz
cd /tmp/miunlett && ${MAKE} install
miunlett.cls:
wget -O $@ ${CURRENT_URL}/$@
.PHONY: miunlett
miunlett: miunlett.cls miunlogo
.PHONY: clean-miunlett
clean-depends distclean: clean-miunlett
clean-miunlett:
${RM} miunlett.cls
### MIUN Protocol class ###
miunprot-depend?= ${TEXMF}/tex/latex/miun/miunprot/miunprot.sty
${miunprot-depend}:
wget -O /tmp/miunprot.tar.gz \
http://ver.miun.se/latex/packages/miunprot.tar.gz
cd /tmp && tar -zxf miunprot.tar.gz
cd /tmp/miunprot && ${MAKE} install
MIUNPROT_FILES= miunprot.cls miunprot-English.dict miunprot-Swedish.dict
ifdef INCLUDE_MIUNTEX
$(foreach f,${MIUNPROT_FILES},$(eval $f: ${INCLUDE_MIUNTEX}/miunprot/$f))
${MIUNPROT_FILES}:
ln -s $^ $@
else
${MIUNPROT_FILES}:
wget -O $@ ${CURRENT_URL}/$@
endif
.PHONY: miunprot
miunprot: ${MIUNPROT_FILES} miunlogo
.PHONY: clean-miunprot
clean-depends distclean: clean-miunprot
clean-miunprot:
${RM} ${MIUNPROT_FILES}
### MIUN Thesis class ###
miunthes-depend?= ${TEXMF}/tex/latex/miun/miunthes/miunthes.sty
${miunthes-depend}:
wget -O /tmp/miunthes.tar.gz \
http://ver.miun.se/latex/packages/miunthes.tar.gz
cd /tmp && tar -zxf miunthes.tar.gz
cd /tmp/miunthes && ${MAKE} install
MIUNTHES_FILES= miunthes.cls miunthes-English.dict miunthes-Swedish.dict
ifdef INCLUDE_MIUNTEX
$(foreach f,${MIUNTHES_FILES},$(eval $f: ${INCLUDE_MIUNTEX}/miunthes/$f))
${MIUNTHES_FILES}:
ln -s $^ $@
else
${MIUNTHES_FILES}:
wget -O $@ ${CURRENT_URL}/$@
endif
.PHONY: miunthes
miunthes: ${MIUNTHES_FILES} miunlogo latexmkrc
.PHONY: clean-miunthes
clean-depends distclean: clean-miunthes
clean-miunthes:
${RM} ${MIUNTHES_FILES}
### INCLUDES ###
INCLUDE_MAKEFILES?= .
INCLUDES= depend.mk tex.mk
define inc
ifeq ($(findstring $(1),${MAKEFILE_LIST}),)
$(1):
wget https://raw.githubusercontent.com/dbosk/makefiles/master/$(1)
include ${INCLUDE_MAKEFILES}/$(1)
endif
endef
$(foreach i,${INCLUDES},$(eval $(call inc,$i)))
### END INCLUDES ###
endif