Makefile 871 B

123456789101112131415161718192021222324
  1. PROJ = lkmpg
  2. all: $(PROJ).pdf
  3. $(PROJ).pdf: lkmpg.tex
  4. pdflatex -shell-escap $<
  5. bibtex $(PROJ) >/dev/null || echo
  6. pdflatex -shell-escape $< 2>/dev/null >/dev/null
  7. rm -rf _minted-$(PROJ)
  8. html: lkmpg.tex html.cfg
  9. sed $ 's/\t/ /g' lkmpg.tex > lkmpg-for-ht.tex
  10. make4ht --shell-escape --utf8 --format html5 --config html.cfg --output-dir html lkmpg-for-ht.tex "fn-in"
  11. ln -sf lkmpg-for-ht.html html/index.html
  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
  18. rm -rf html
  19. .PHONY: html