2021-08-07 18:49:24 +08:00
|
|
|
PROJ = lkmpg
|
|
|
|
all: $(PROJ).pdf
|
|
|
|
|
|
|
|
$(PROJ).pdf: lkmpg.tex
|
2022-03-19 02:56:25 +08:00
|
|
|
@if ! hash latexmk; then echo "No Latexmk found. See https://mg.readthedocs.io/latexmk.html for installation."; exit 1; fi
|
2021-08-09 02:14:24 +08:00
|
|
|
rm -rf _minted-$(PROJ)
|
2022-03-19 02:02:21 +08:00
|
|
|
latexmk -shell-escape lkmpg.tex -pdf
|
2021-07-22 06:35:24 +08:00
|
|
|
|
2021-10-10 21:34:25 +08:00
|
|
|
html: lkmpg.tex html.cfg assets/Manrope_variable.ttf
|
2021-08-08 01:29:50 +08:00
|
|
|
sed $ 's/\t/ /g' lkmpg.tex > lkmpg-for-ht.tex
|
2021-08-23 21:30:43 +08:00
|
|
|
make4ht --shell-escape --utf8 --format html5 --config html.cfg --output-dir html lkmpg-for-ht.tex "fn-in"
|
2021-08-08 01:29:50 +08:00
|
|
|
ln -sf lkmpg-for-ht.html html/index.html
|
2021-10-10 21:34:25 +08:00
|
|
|
cp assets/Manrope_variable.ttf html/Manrope_variable.ttf
|
2021-08-08 01:29:50 +08:00
|
|
|
rm -f lkmpg-for-ht.tex lkmpg-for-ht.xref lkmpg-for-ht.tmp lkmpg-for-ht.html lkmpg-for-ht.css lkmpg-for-ht.4ct lkmpg-for-ht.4tc lkmpg-for-ht.dvi lkmpg-for-ht.lg lkmpg-for-ht.idv lkmpg*.svg lkmpg-for-ht.log lkmpg-for-ht.aux
|
|
|
|
rm -rf _minted-$(PROJ) _minted-lkmpg-for-ht
|
2021-08-02 02:42:39 +08:00
|
|
|
|
2021-08-07 23:33:37 +08:00
|
|
|
indent:
|
|
|
|
(cd examples; find . -name '*.[ch]' | xargs clang-format -i)
|
|
|
|
|
2021-07-22 06:35:24 +08:00
|
|
|
clean:
|
2022-03-19 02:02:21 +08:00
|
|
|
rm -f *.dvi *.aux *.log *.ps *.pdf *.out lkmpg.bbl lkmpg.blg lkmpg.lof lkmpg.toc lkmpg.fdb_latexmk lkmpg.fls
|
2021-08-02 02:42:39 +08:00
|
|
|
rm -rf html
|
|
|
|
|
2021-10-10 21:34:25 +08:00
|
|
|
.PHONY: html
|