add remap appenfix to pdf
[libreriscv.git] / openpower / Makefile
1 #!/usr/bin/make -f
2 ISA_DIR := ../../openpower-isa/openpower/isa
3 SOURCE_TEX := tex_out/remap.tex \
4 tex_out/remap_appendix.tex \
5 tex_out/bitmanip.tex tex_out/vector_ops.tex \
6 tex_out/sv.tex tex_out/svp64_appendix.tex \
7 tex_out/overview.tex tex_out/svp64.tex \
8 tex_out/compliancy_levels.tex tex_out/svp64_quirks.tex \
9 tex_out/sprs.tex tex_out/opcode_regs_deduped.tex \
10 tex_out/normal.tex tex_out/ldst.tex \
11 tex_out/branches.tex tex_out/cr_ops.tex \
12 tex_out/setvl.tex tex_out/svstep.tex \
13 tex_out/mv_swizzle.tex tex_out/mv_vec.tex \
14 tex_out/pseudocode_simplev.tex \
15 tex_out/pseudocode_bitmanip.tex \
16 tex_out/cr_int_predication.tex \
17 tex_out/fcvt.tex tex_out/fclass.tex \
18 tex_out/int_fp_mv.tex tex_out/av_opcodes.tex \
19 tex_out/big_integer.tex \
20 tex_out/pseudocode_fixedshift.tex \
21 tex_out/pseudocode_bcd.tex tex_out/pseudocode_branch.tex \
22 tex_out/pseudocode_comparefixed.tex \
23 tex_out/pseudocode_condition.tex \
24 tex_out/pseudocode_svfparith.tex \
25 tex_out/pseudocode_fixedarith.tex \
26 tex_out/pseudocode_fixedload.tex \
27 tex_out/pseudocode_fixedlogical.tex \
28 tex_out/pseudocode_fixedstore.tex \
29 tex_out/pseudocode_fixedtrap.tex \
30 tex_out/pseudocode_sprset.tex \
31 tex_out/pseudocode_stringldst.tex \
32 tex_out/pseudocode_system.tex \
33 tex_out/pseudocode_fpload.tex tex_out/pseudocode_fpstore.tex \
34 tex_out/pseudocode_fpmove.tex tex_out/pseudocode_fparith.tex \
35 tex_out/pseudocode_fpcvt.tex \
36 tex_out/pseudocode_svfixedarith.tex \
37 tex_out/big_integer_analysis.tex \
38 tex_out/transcendentals.tex \
39 tex_out/atomics.tex \
40 tex_out/vector_isas.tex \
41 tex_out/fields.tex
42
43 # Does this umbrella rule need to be modified?
44 tex: $(SOURCE_TEX)
45 mkdir -p tex_out
46
47 tex_out/vector_isas.tex : sv/vector_isa_comparison.mdwn
48 mkdir -p tex_out
49 pandoc -f markdown -t latex --top-level-division=section \
50 --filter pandoc_img.py \
51 -N -o tex_out/vector_isas.tex sv/vector_isa_comparison.mdwn
52
53 tex_out/big_integer_analysis.tex : sv/biginteger/analysis.mdwn
54 mkdir -p tex_out
55 pandoc -f markdown -t latex --top-level-division=section \
56 --filter pandoc_img.py \
57 -N -o tex_out/big_integer_analysis.tex sv/biginteger/analysis.mdwn
58
59 tex_out/pseudocode_fixedlogical.tex : $(ISA_DIR)/fixedlogical.mdwn
60 mkdir -p tex_out
61 pandoc -f markdown -t latex --top-level-division=section \
62 --filter pandoc_img.py \
63 -N -o tex_out/pseudocode_fixedlogical.tex \
64 $(ISA_DIR)/fixedlogical.mdwn
65
66 tex_out/pseudocode_fixedarith.tex : $(ISA_DIR)/fixedarith.mdwn
67 mkdir -p tex_out
68 pandoc -f markdown -t latex --top-level-division=section \
69 --filter pandoc_img.py \
70 -N -o tex_out/pseudocode_fixedarith.tex \
71 $(ISA_DIR)/fixedarith.mdwn
72
73 tex_out/pseudocode_svfixedarith.tex : $(ISA_DIR)/svfixedarith.mdwn
74 mkdir -p tex_out
75 pandoc -f markdown -t latex --top-level-division=section \
76 --filter pandoc_img.py \
77 -N -o tex_out/pseudocode_svfixedarith.tex \
78 $(ISA_DIR)/svfixedarith.mdwn
79
80 tex_out/pseudocode_svfparith.tex : $(ISA_DIR)/svfparith.mdwn
81 mkdir -p tex_out
82 pandoc -f markdown -t latex --top-level-division=section \
83 --filter pandoc_img.py \
84 -N -o tex_out/pseudocode_svfparith.tex \
85 $(ISA_DIR)/svfparith.mdwn
86
87 tex_out/sv.tex : sv.mdwn
88 mkdir -p tex_out
89 pandoc -f markdown -t latex --top-level-division=section \
90 --filter pandoc_img.py \
91 -N -o tex_out/sv.tex sv.mdwn
92
93 tex_out/overview.tex : sv/overview.mdwn
94 mkdir -p tex_out
95 pandoc -f markdown -t latex --top-level-division=section \
96 --filter pandoc_img.py \
97 -N -o tex_out/overview.tex sv/overview.mdwn
98
99 tex_out/svp64.tex : sv/svp64.mdwn
100 mkdir -p tex_out
101 pandoc -f markdown -t latex --top-level-division=section \
102 --filter pandoc_img.py \
103 -N -o tex_out/svp64.tex sv/svp64.mdwn
104
105 tex_out/compliancy_levels.tex : sv/compliancy_levels.mdwn
106 mkdir -p tex_out
107 pandoc -f markdown -t latex --top-level-division=section \
108 --filter pandoc_img.py \
109 -N -o tex_out/compliancy_levels.tex sv/compliancy_levels.mdwn
110
111 tex_out/svp64_quirks.tex : sv/svp64_quirks.mdwn
112 mkdir -p tex_out
113 pandoc -f markdown -t latex --top-level-division=section \
114 --filter pandoc_img.py \
115 -N -o tex_out/svp64_quirks.tex sv/svp64_quirks.mdwn
116
117 tex_out/sprs.tex : sv/sprs.mdwn
118 mkdir -p tex_out
119 pandoc -f markdown -t latex --top-level-division=section \
120 --filter pandoc_img.py \
121 -N -o tex_out/sprs.tex sv/sprs.mdwn
122
123 tex_out/opcode_regs_deduped.tex : opcode_regs_deduped.mdwn
124 mkdir -p tex_out
125 pandoc -f markdown -t latex --top-level-division=section \
126 --filter pandoc_img.py \
127 -N -o tex_out/opcode_regs_deduped.tex opcode_regs_deduped.mdwn
128
129 tex_out/normal.tex : sv/normal.mdwn
130 mkdir -p tex_out
131 pandoc -f markdown -t latex --top-level-division=section \
132 --filter pandoc_img.py \
133 -N -o tex_out/normal.tex sv/normal.mdwn
134
135 tex_out/ldst.tex : sv/ldst.mdwn
136 mkdir -p tex_out
137 pandoc -f markdown -t latex --top-level-division=section \
138 --filter pandoc_img.py \
139 -N -o tex_out/ldst.tex sv/ldst.mdwn
140
141 tex_out/branches.tex : sv/branches.mdwn
142 mkdir -p tex_out
143 pandoc -f markdown -t latex --top-level-division=section \
144 --filter pandoc_img.py \
145 -N -o tex_out/branches.tex sv/branches.mdwn
146
147 tex_out/cr_ops.tex : sv/cr_ops.mdwn
148 mkdir -p tex_out
149 pandoc -f markdown -t latex --top-level-division=section \
150 --filter pandoc_img.py \
151 -N -o tex_out/cr_ops.tex sv/cr_ops.mdwn
152
153 tex_out/setvl.tex : sv/setvl.mdwn
154 mkdir -p tex_out
155 pandoc -f markdown -t latex --top-level-division=section \
156 --filter pandoc_img.py \
157 -N -o tex_out/setvl.tex sv/setvl.mdwn
158
159 tex_out/svstep.tex : sv/svstep.mdwn
160 mkdir -p tex_out
161 pandoc -f markdown -t latex --top-level-division=section \
162 --filter pandoc_img.py \
163 -N -o tex_out/svstep.tex sv/svstep.mdwn
164
165 tex_out/mv_swizzle.tex : sv/mv.swizzle.mdwn
166 mkdir -p tex_out
167 pandoc -f markdown -t latex --top-level-division=section \
168 --filter pandoc_img.py \
169 -N -o tex_out/mv_swizzle.tex sv/mv.swizzle.mdwn
170
171 tex_out/fields.tex : sv/fields.mdwn
172 mkdir -p tex_out
173 ./mdwn_inline.py sv/fields.mdwn tex_out/fields.mdwn
174 pandoc -f markdown -t latex --top-level-division=section \
175 --filter pandoc_img.py \
176 -N -o tex_out/fields.tex tex_out/fields.mdwn
177 sed -i 's/\\section{/\\section*{/g' tex_out/fields.tex
178
179 tex_out/mv_vec.tex : sv/mv.vec.mdwn
180 mkdir -p tex_out
181 pandoc -f markdown -t latex --top-level-division=section \
182 --filter pandoc_img.py \
183 -N -o tex_out/mv_vec.tex sv/mv.vec.mdwn
184
185 tex_out/pseudocode_simplev.tex : $(ISA_DIR)/simplev.mdwn
186 mkdir -p tex_out
187 pandoc -f markdown -t latex --top-level-division=section \
188 --filter pandoc_img.py \
189 -N -o tex_out/pseudocode_simplev.tex \
190 $(ISA_DIR)/simplev.mdwn
191
192 tex_out/pseudocode_bitmanip.tex : $(ISA_DIR)/bitmanip.mdwn
193 mkdir -p tex_out
194 pandoc -f markdown -t latex --top-level-division=section \
195 --filter pandoc_img.py \
196 -N -o tex_out/pseudocode_bitmanip.tex \
197 $(ISA_DIR)/bitmanip.mdwn
198
199 tex_out/cr_int_predication.tex : sv/cr_int_predication.mdwn
200 mkdir -p tex_out
201 pandoc -f markdown -t latex --top-level-division=section \
202 --filter pandoc_img.py \
203 -N -o tex_out/cr_int_predication.tex sv/cr_int_predication.mdwn
204
205 tex_out/fcvt.tex : sv/fcvt.mdwn
206 mkdir -p tex_out
207 pandoc -f markdown -t latex --top-level-division=section \
208 --filter pandoc_img.py \
209 -N -o tex_out/fcvt.tex sv/fcvt.mdwn
210
211 tex_out/fclass.tex : sv/fclass.mdwn
212 mkdir -p tex_out
213 pandoc -f markdown -t latex --top-level-division=section \
214 --filter pandoc_img.py \
215 -N -o tex_out/fclass.tex sv/fclass.mdwn
216
217 tex_out/int_fp_mv.tex : sv/int_fp_mv.mdwn
218 mkdir -p tex_out
219 pandoc -f markdown -t latex --top-level-division=section \
220 --filter pandoc_img.py \
221 -N -o tex_out/int_fp_mv.tex sv/int_fp_mv.mdwn
222
223 tex_out/av_opcodes.tex : sv/av_opcodes.mdwn
224 mkdir -p tex_out
225 pandoc -f markdown -t latex --top-level-division=section \
226 --filter pandoc_img.py \
227 -N -o tex_out/av_opcodes.tex sv/av_opcodes.mdwn
228
229 tex_out/big_integer.tex : sv/biginteger.mdwn
230 mkdir -p tex_out
231 pandoc -f markdown -t latex --top-level-division=section \
232 --filter pandoc_img.py \
233 -N -o tex_out/big_integer.tex sv/biginteger.mdwn
234
235 tex_out/pseudocode_fixedshift.tex : $(ISA_DIR)/fixedshift.mdwn
236 mkdir -p tex_out
237 pandoc -f markdown -t latex --top-level-division=section \
238 --filter pandoc_img.py \
239 -N -o tex_out/pseudocode_fixedshift.tex \
240 $(ISA_DIR)/fixedshift.mdwn
241
242 tex_out/atomics.tex: atomics.mdwn
243 mkdir -p tex_out
244 ./mdwn_inline.py atomics.mdwn tex_out/atomics.mdwn
245 pandoc -f markdown -t latex --top-level-division=section \
246 --filter pandoc_img.py \
247 -N -o tex_out/atomics.tex tex_out/atomics.mdwn
248
249 tex_out/transcendentals.tex: transcendentals.mdwn
250 mkdir -p tex_out
251 ./mdwn_inline.py transcendentals.mdwn tex_out/transcendentals.mdwn
252 pandoc -f markdown -t latex --top-level-division=section \
253 --filter pandoc_img.py \
254 -N -o tex_out/transcendentals.tex tex_out/transcendentals.mdwn
255
256 tex_out/svp64_appendix.tex: sv/svp64/appendix.mdwn
257 mkdir -p tex_out
258 ./mdwn_inline.py sv/svp64/appendix.mdwn tex_out/appendix.mdwn
259 pandoc -f markdown -t latex --top-level-division=section \
260 --filter pandoc_img.py \
261 -N -o tex_out/svp64_appendix.tex tex_out/appendix.mdwn
262
263 tex_out/vector_ops.tex: sv/vector_ops.mdwn
264 mkdir -p tex_out
265 ./mdwn_inline.py sv/vector_ops.mdwn tex_out/vector_ops.mdwn
266 pandoc -f markdown -t latex --top-level-division=section \
267 --filter pandoc_img.py \
268 -N -o tex_out/vector_ops.tex tex_out/vector_ops.mdwn
269
270 tex_out/remap_appendix.tex: sv/remap/appendix.mdwn
271 mkdir -p tex_out
272 ./mdwn_inline.py sv/remap/appendix.mdwn tex_out/remap_appendix.mdwn
273 pandoc -f markdown -t latex --top-level-division=section \
274 --filter pandoc_img.py \
275 -N -o tex_out/remap_appendix.tex tex_out/remap_appendix.mdwn
276
277 tex_out/remap.tex: sv/remap.mdwn
278 mkdir -p tex_out
279 ./mdwn_inline.py sv/remap.mdwn tex_out/remap.mdwn
280 pandoc -f markdown -t latex --top-level-division=section \
281 --filter pandoc_img.py \
282 -N -o tex_out/remap.tex tex_out/remap.mdwn
283
284 tex_out/bitmanip.tex: sv/bitmanip.mdwn pandoc_img.py
285 mkdir -p tex_out
286 ./mdwn_inline.py sv/bitmanip.mdwn tex_out/bitmanip.mdwn
287 pandoc -f markdown -t latex --top-level-division=section \
288 --filter pandoc_img.py \
289 -N -o tex_out/bitmanip.tex tex_out/bitmanip.mdwn
290
291 tex_out/pseudocode_bcd.tex : $(ISA_DIR)/bcd.mdwn
292 mkdir -p tex_out
293 pandoc -f markdown -t latex --top-level-division=section \
294 --filter pandoc_img.py \
295 -N -o tex_out/pseudocode_bcd.tex \
296 $(ISA_DIR)/bcd.mdwn
297
298 tex_out/pseudocode_branch.tex : $(ISA_DIR)/branch.mdwn
299 mkdir -p tex_out
300 pandoc -f markdown -t latex --top-level-division=section \
301 --filter pandoc_img.py \
302 -N -o tex_out/pseudocode_branch.tex \
303 $(ISA_DIR)/branch.mdwn
304
305 tex_out/pseudocode_comparefixed.tex : $(ISA_DIR)/comparefixed.mdwn
306 mkdir -p tex_out
307 pandoc -f markdown -t latex --top-level-division=section \
308 --filter pandoc_img.py \
309 -N -o tex_out/pseudocode_comparefixed.tex \
310 $(ISA_DIR)/comparefixed.mdwn
311
312 tex_out/pseudocode_condition.tex : $(ISA_DIR)/condition.mdwn
313 mkdir -p tex_out
314 pandoc -f markdown -t latex --top-level-division=section \
315 --filter pandoc_img.py \
316 -N -o tex_out/pseudocode_condition.tex \
317 $(ISA_DIR)/condition.mdwn
318
319 tex_out/pseudocode_fixedload.tex : $(ISA_DIR)/fixedload.mdwn
320 mkdir -p tex_out
321 pandoc -f markdown -t latex --top-level-division=section \
322 --filter pandoc_img.py \
323 -N -o tex_out/pseudocode_fixedload.tex \
324 $(ISA_DIR)/fixedload.mdwn
325
326 tex_out/pseudocode_fixedstore.tex : $(ISA_DIR)/fixedstore.mdwn
327 mkdir -p tex_out
328 pandoc -f markdown -t latex --top-level-division=section \
329 --filter pandoc_img.py \
330 -N -o tex_out/pseudocode_fixedstore.tex \
331 $(ISA_DIR)/fixedstore.mdwn
332
333 tex_out/pseudocode_fixedtrap.tex : $(ISA_DIR)/fixedtrap.mdwn
334 mkdir -p tex_out
335 pandoc -f markdown -t latex --top-level-division=section \
336 --filter pandoc_img.py \
337 -N -o tex_out/pseudocode_fixedtrap.tex \
338 $(ISA_DIR)/fixedtrap.mdwn
339
340 tex_out/pseudocode_sprset.tex : $(ISA_DIR)/sprset.mdwn
341 mkdir -p tex_out
342 pandoc -f markdown -t latex --top-level-division=section \
343 --filter pandoc_img.py \
344 -N -o tex_out/pseudocode_sprset.tex \
345 $(ISA_DIR)/sprset.mdwn
346
347 tex_out/pseudocode_stringldst.tex : $(ISA_DIR)/stringldst.mdwn
348 mkdir -p tex_out
349 pandoc -f markdown -t latex --top-level-division=section \
350 --filter pandoc_img.py \
351 -N -o tex_out/pseudocode_stringldst.tex \
352 $(ISA_DIR)/stringldst.mdwn
353
354 tex_out/pseudocode_system.tex : $(ISA_DIR)/system.mdwn
355 mkdir -p tex_out
356 pandoc -f markdown -t latex --top-level-division=section \
357 --filter pandoc_img.py \
358 -N -o tex_out/pseudocode_system.tex \
359 $(ISA_DIR)/system.mdwn
360
361 tex_out/pseudocode_fpload.tex : $(ISA_DIR)/fpload.mdwn
362 mkdir -p tex_out
363 pandoc -f markdown -t latex --top-level-division=section \
364 --filter pandoc_img.py \
365 -N -o tex_out/pseudocode_fpload.tex \
366 $(ISA_DIR)/fpload.mdwn
367
368 tex_out/pseudocode_fpstore.tex : $(ISA_DIR)/fpstore.mdwn
369 mkdir -p tex_out
370 pandoc -f markdown -t latex --top-level-division=section \
371 --filter pandoc_img.py \
372 -N -o tex_out/pseudocode_fpstore.tex \
373 $(ISA_DIR)/fpstore.mdwn
374
375 tex_out/pseudocode_fpmove.tex : $(ISA_DIR)/fpmove.mdwn
376 mkdir -p tex_out
377 pandoc -f markdown -t latex --top-level-division=section \
378 --filter pandoc_img.py \
379 -N -o tex_out/pseudocode_fpmove.tex \
380 $(ISA_DIR)/fpmove.mdwn
381
382 tex_out/pseudocode_fparith.tex : $(ISA_DIR)/fparith.mdwn
383 mkdir -p tex_out
384 pandoc -f markdown -t latex --top-level-division=section \
385 --filter pandoc_img.py \
386 -N -o tex_out/pseudocode_fparith.tex \
387 $(ISA_DIR)/fparith.mdwn
388
389 tex_out/pseudocode_fpcvt.tex : $(ISA_DIR)/fpcvt.mdwn
390 mkdir -p tex_out
391 pandoc -f markdown -t latex --top-level-division=section \
392 --filter pandoc_img.py \
393 -N -o tex_out/pseudocode_fpcvt.tex \
394 $(ISA_DIR)/fpcvt.mdwn
395
396
397
398 simple_v_spec.pdf : tex simple_v_spec.tex
399 pdflatex -synctex=1 -interaction=nonstopmode simple_v_spec.tex
400
401 pdf : simple_v_spec.pdf
402
403 upload : pdf
404 rsync -HPavz simple_v_spec.pdf \
405 libre-soc.org:/var/www/ftp.libre-riscv.org
406
407 clean:
408 rm -fr tex_out