a813c90aafd99c279e2ac533aa3d754c4e2769b5
[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 --filter ../../pandoc_img.py \
29 -V margin-top=0.9in \
30 -V margin-bottom=0.9in \
31 -V margin-left=0.4in \
32 -V margin-right=0.4in \
33 -V fontsize=9pt \
34 -V papersize=legal \
35 -V linkcolor=blue \
36 -f markdown $< \
37 -s --self-contained \
38 --mathjax \
39 -o $@
40
41 upload:
42 rsync -HPavz *.pdf libre-soc.org:opf_isa_wg/
43 ssh libre-soc.org 'cp opf_isa_wg/*.pdf /var/www/ftp.libre-riscv.org/opf_ext_rfc/'
44
45 clean:
46 rm -fr *.pdf tex_out ls012/areas.mdwn ls012/xo_cost.mdwn
47
48 -include $(deps)