README.txt 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. LLVM Documentation
  2. ==================
  3. LLVM's documentation is written in reStructuredText, a lightweight
  4. plaintext markup language (file extension `.rst`). While the
  5. reStructuredText documentation should be quite readable in source form, it
  6. is mostly meant to be processed by the Sphinx documentation generation
  7. system to create HTML pages which are hosted on <http://llvm.org/docs/> and
  8. updated after every commit. Manpage output is also supported, see below.
  9. If you instead would like to generate and view the HTML locally, install
  10. Sphinx <http://sphinx-doc.org/> and then do:
  11. cd docs/
  12. make -f Makefile.sphinx
  13. $BROWSER _build/html/index.html
  14. The mapping between reStructuredText files and generated documentation is
  15. `docs/Foo.rst` <-> `_build/html/Foo.html` <-> `http://llvm.org/docs/Foo.html`.
  16. If you are interested in writing new documentation, you will want to read
  17. `SphinxQuickstartTemplate.rst` which will get you writing documentation
  18. very fast and includes examples of the most important reStructuredText
  19. markup syntax.
  20. Manpage Output
  21. ===============
  22. Building the manpages is similar to building the HTML documentation. The
  23. primary difference is to use the `man` makefile target, instead of the
  24. default (which is `html`). Sphinx then produces the man pages in the
  25. directory `_build/man/`.
  26. cd docs/
  27. make -f Makefile.sphinx man
  28. man -l _build/man/FileCheck.1
  29. The correspondence between .rst files and man pages is
  30. `docs/CommandGuide/Foo.rst` <-> `_build/man/Foo.1`.
  31. These .rst files are also included during HTML generation so they are also
  32. viewable online (as noted above) at e.g.
  33. `http://llvm.org/docs/CommandGuide/Foo.html`.
  34. Checking links
  35. ==============
  36. The reachibility of external links in the documentation can be checked by
  37. running:
  38. cd docs/
  39. make -f Makefile.sphinx linkcheck