1
0

Makefile 1.0 KB

123456789101112131415161718192021222324
  1. PROJ = lkmpg
  2. all: $(PROJ).pdf
  3. $(PROJ).pdf: lkmpg.tex
  4. @if ! hash latexmk; then echo "No Latexmk found. See https://mg.readthedocs.io/latexmk.html for installation."; exit 1; fi
  5. rm -rf _minted-$(PROJ)
  6. latexmk -shell-escape lkmpg.tex -pdf
  7. html: lkmpg.tex html.cfg assets/Manrope_variable.ttf
  8. sed $ 's/\t/ /g' lkmpg.tex > lkmpg-for-ht.tex
  9. make4ht --shell-escape --utf8 --format html5 --config html.cfg --output-dir html lkmpg-for-ht.tex "fn-in"
  10. ln -sf lkmpg-for-ht.html html/index.html
  11. cp assets/Manrope_variable.ttf html/Manrope_variable.ttf
  12. 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
  13. rm -rf _minted-$(PROJ) _minted-lkmpg-for-ht
  14. indent:
  15. (cd examples; find . -name '*.[ch]' | xargs clang-format -i)
  16. clean:
  17. rm -f *.dvi *.aux *.log *.ps *.pdf *.out lkmpg.bbl lkmpg.blg lkmpg.lof lkmpg.toc lkmpg.fdb_latexmk lkmpg.fls
  18. rm -rf html
  19. .PHONY: html