Makefile 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. # This program is free software under the terms of the GNU General Public
  2. # License. See the COPYING file which must come with this package.
  3. SOURCES = $(wildcard *.rst)
  4. HTML_TARGETS = $(patsubst %.rst,%.html,$(SOURCES))
  5. RM = rm
  6. RST2HTML=`type rst2html >/dev/null 2>&1 && echo rst2html || echo rst2html.py`
  7. RST2MAN=`type rst2man >/dev/null 2>&1 && echo rst2man || echo rst2man.py`
  8. SPHINXBUILD = sphinx-build
  9. docs: man api
  10. html: $(HTML_TARGETS)
  11. $(HTML_TARGETS): %.html : %.rst
  12. $(RST2HTML) $? $@
  13. manhtml: offlineimap.html offlineimapui.html
  14. offlineimap.html: offlineimap.txt offlineimap.known_issues.txt
  15. a2x -v -d manpage -D manhtml -f xhtml $<
  16. offlineimapui.html: offlineimapui.txt
  17. a2x -v -d manpage -D manhtml -f xhtml $<
  18. man: offlineimap.1 offlineimapui.7
  19. offlineimap.1: offlineimap.txt offlineimap.known_issues.txt
  20. a2x -v -d manpage -f manpage $<
  21. offlineimapui.7: offlineimapui.txt
  22. a2x -v -d manpage -f manpage $<
  23. api:
  24. $(SPHINXBUILD) -b html -d html/doctrees doc-src html
  25. websitedoc:
  26. ./website-doc.sh releases
  27. ./website-doc.sh api
  28. ./website-doc.sh html
  29. ./website-doc.sh contrib
  30. clean:
  31. $(RM) -f $(HTML_TARGETS)
  32. $(RM) -f offlineimap.1
  33. $(RM) -f offlineimap.7
  34. $(RM) -f manhtml/*
  35. $(RM) -rf html/*
  36. -find . -name '*.html' -exec rm -f {} \;
  37. .PHONY: clean doc