Makefile 1012 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. man: offlineimap.1 offlineimapui.7
  14. offlineimap.1: offlineimap.txt offlineimap.known_issues.txt
  15. a2x -v -d manpage -f manpage $<
  16. offlineimapui.7: offlineimapui.txt
  17. a2x -v -d manpage -f manpage $<
  18. api:
  19. $(SPHINXBUILD) -b html -d html/doctrees doc-src html
  20. websitedoc:
  21. ./website-doc.sh releases
  22. ./website-doc.sh api
  23. ./website-doc.sh contrib
  24. clean:
  25. $(RM) -f $(HTML_TARGETS)
  26. $(RM) -f offlineimap.1
  27. $(RM) -f offlineimap.7
  28. $(RM) -rf html/*
  29. -find ./docs -name '*.html' -exec rm -f {} \;
  30. .PHONY: clean doc