(no commit message)
[libreriscv.git] / openpower / sv / rfc / Makefile
1 .PHONY: all clean upload
2
3 .SECONDARY:
4
5 main_sources = $(wildcard ls*.mdwn)
6 pdfs = $(patsubst %.mdwn,%.pdf,$(main_sources))
7 deps = $(patsubst %,tex_out/%.d,$(main_sources))
8
9 all: $(pdfs)
10
11 ls012 = $(realpath ls012)
12
13 $(ls012)/areas.mdwn $(ls012)/xo_cost.mdwn \
14 $(ls012)/level.mdwn: ls012_optable.py ls012/optable.csv
15 @echo making optables
16 python3 ls012_optable.py
17
18 tex_out/%.mdwn.d: %.mdwn ../../mdwn_inline.py
19 @mkdir -p $(dir $@)
20 @../../mdwn_inline.py --deps $< tex_out/$*.mdwn
21
22 tex_out/%.mdwn: %.mdwn ../../mdwn_inline.py
23 mkdir -p $(dir $@)
24 ../../mdwn_inline.py $< tex_out/$*.mdwn
25
26 %.pdf: tex_out/%.mdwn ../../pandoc_img.py
27 pandoc \
28 --pdf-engine=xelatex \
29 -V 'mainfont:DejaVuSerif' \
30 -V 'sansfont:DejaVuSans' \
31 -V 'monofont:DejaVuSansMono' \
32 -V 'mathfont:Latin Modern Math' \
33 --filter ../../pandoc_img.py \
34 -V margin-top=0.5in \
35 -V margin-bottom=0.5in \
36 -V margin-left=0.4in \
37 -V margin-right=0.4in \
38 -V fontsize=9pt \
39 -V papersize=legal \
40 -V linkcolor=blue \
41 -f markdown $< \
42 -s --self-contained \
43 --mathjax \
44 -o $@
45
46 upload:
47 rsync -HPavz *.pdf libre-soc.org:opf_isa_wg/
48 ssh libre-soc.org 'cp opf_isa_wg/*.pdf /var/www/ftp.libre-riscv.org/opf_ext_rfc/'
49
50 clean:
51 rm -fr *.pdf tex_out ls012/areas.mdwn ls012/xo_cost.mdwn
52
53 -include $(deps)