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