make biginteger pdfs too
authorJacob Lifshay <programmerjake@gmail.com>
Fri, 4 Aug 2023 21:28:35 +0000 (14:28 -0700)
committerJacob Lifshay <programmerjake@gmail.com>
Fri, 4 Aug 2023 21:28:35 +0000 (14:28 -0700)
openpower/sv/biginteger/.gitignore [new file with mode: 0644]
openpower/sv/biginteger/Makefile [new file with mode: 0644]

diff --git a/openpower/sv/biginteger/.gitignore b/openpower/sv/biginteger/.gitignore
new file mode 100644 (file)
index 0000000..4533ffb
--- /dev/null
@@ -0,0 +1 @@
+/*.pdf
\ No newline at end of file
diff --git a/openpower/sv/biginteger/Makefile b/openpower/sv/biginteger/Makefile
new file mode 100644 (file)
index 0000000..f2bee30
--- /dev/null
@@ -0,0 +1,42 @@
+SHELL=/bin/bash
+
+.PHONY: all clean upload
+
+.SECONDARY:
+
+main_sources = $(wildcard *.mdwn)
+pdfs = $(patsubst %.mdwn,%.pdf,$(main_sources))
+deps = $(patsubst %,tex_out/%.d,$(main_sources))
+
+all: $(pdfs)
+
+tex_out/%.mdwn.d: %.mdwn ../../mdwn_inline.py
+       @mkdir -p $(dir $@)
+       @../../mdwn_inline.py --deps $< tex_out/$*.mdwn
+
+tex_out/%.mdwn: %.mdwn ../../mdwn_inline.py
+       mkdir -p $(dir $@)
+       ../../mdwn_inline.py $< tex_out/$*.mdwn
+
+%.pdf: tex_out/%.mdwn ../../pandoc_img.py
+       pandoc \
+               --filter ../../pandoc_img.py \
+               -V margin-top=0.9in \
+               -V margin-bottom=0.9in \
+               -V margin-left=0.4in \
+               -V margin-right=0.4in \
+               -V fontsize=9pt \
+               -V papersize=legal \
+               -V linkcolor=blue \
+               -f markdown $< \
+               -s --self-contained \
+               --mathjax \
+               -o $@
+
+upload: all
+       sftp sftp://ftp@ftp.libre-soc.org:922 <<<$$'cd biginteger\nprogress\nput *.pdf'
+
+clean:
+       rm -fr *.pdf tex_out
+
+-include $(deps)