diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-07-26 16:05:11 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-07-26 16:05:11 -0400 |
| commit | 0f776dc377f6c87f4e4d4a5f63602f33fb93b31e (patch) | |
| tree | 25811858d15be4c526c6c887d8c41c0546edd6b9 | |
| parent | 015cd867e566e3a27b5e8062eb24eeaa4d77297f (diff) | |
| parent | a88b1672d4ddf9895eb53e6980926d5e960dea8e (diff) | |
Merge tag 'docs-for-linus' of git://git.lwn.net/linux
Pull documentation updates from Jonathan Corbet:
"Some big changes this month, headlined by the addition of a new
formatted documentation mechanism based on the Sphinx system.
The objectives here are to make it easier to create better-integrated
(and more attractive) documents while (eventually) dumping our
one-of-a-kind, cobbled-together system for something that is widely
used and maintained by others. There's a fair amount of information
what's being done, why, and how to use it in:
https://lwn.net/Articles/692704/
https://lwn.net/Articles/692705/
Closer to home, Documentation/kernel-documentation.rst describes how
it works.
For now, the new system exists alongside the old one; you should soon
see the GPU documentation converted over in the DRM pull and some
significant media conversion work as well. Once all the docs have
been moved over and we're convinced that the rough edges (of which are
are a few) have been smoothed over, the DocBook-based stuff should go
away.
Primary credit is to Jani Nikula for doing the heavy lifting to make
this stuff actually work; there has also been notable effort from
Markus Heiser, Daniel Vetter, and Mauro Carvalho Chehab.
Expect a couple of conflicts on the new index.rst file over the course
of the merge window; they are trivially resolvable. That file may be
a bit of a conflict magnet in the short term, but I don't expect that
situation to last for any real length of time.
Beyond that, of course, we have the usual collection of tweaks,
updates, and typo fixes"
* tag 'docs-for-linus' of git://git.lwn.net/linux: (77 commits)
doc-rst: kernel-doc: fix handling of address_space tags
Revert "doc/sphinx: Enable keep_warnings"
doc-rst: kernel-doc directive, fix state machine reporter
docs: deprecate kernel-doc-nano-HOWTO.txt
doc/sphinx: Enable keep_warnings
Documentation: add watermark_scale_factor to the list of vm systcl file
kernel-doc: Fix up warning output
docs: Get rid of some kernel-documentation warnings
doc-rst: add an option to ignore DocBooks when generating docs
workqueue: Fix a typo in workqueue.txt
Doc: ocfs: Fix typo in filesystems/ocfs2-online-filecheck.txt
Documentation/sphinx: skip build if user requested specific DOCBOOKS
Documentation: add cleanmediadocs to the documentation targets
Add .pyc files to .gitignore
Doc: PM: Fix a typo in intel_powerclamp.txt
doc-rst: flat-table directive - initial implementation
Documentation: add meta-documentation for Sphinx and kernel-doc
Documentation: tiny typo fix in usb/gadget_multi.txt
Documentation: fix wrong value in md.txt
bcache: documentation formatting, edited for clarity, stripe alignment notes
...
30 files changed, 2653 insertions, 430 deletions
diff --git a/Documentation/.gitignore b/Documentation/.gitignore new file mode 100644 index 000000000000..e74fec8693b2 --- /dev/null +++ b/Documentation/.gitignore | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | output | ||
| 2 | *.pyc | ||
diff --git a/Documentation/00-INDEX b/Documentation/00-INDEX index cd077ca0e1b8..cb9a6c6fa83b 100644 --- a/Documentation/00-INDEX +++ b/Documentation/00-INDEX | |||
| @@ -255,10 +255,10 @@ kbuild/ | |||
| 255 | - directory with info about the kernel build process. | 255 | - directory with info about the kernel build process. |
| 256 | kdump/ | 256 | kdump/ |
| 257 | - directory with mini HowTo on getting the crash dump code to work. | 257 | - directory with mini HowTo on getting the crash dump code to work. |
| 258 | kernel-doc-nano-HOWTO.txt | ||
| 259 | - mini HowTo on generation and location of kernel documentation files. | ||
| 260 | kernel-docs.txt | 258 | kernel-docs.txt |
| 261 | - listing of various WWW + books that document kernel internals. | 259 | - listing of various WWW + books that document kernel internals. |
| 260 | kernel-documentation.rst | ||
| 261 | - how to write and format reStructuredText kernel documentation | ||
| 262 | kernel-parameters.txt | 262 | kernel-parameters.txt |
| 263 | - summary listing of command line / boot prompt args for the kernel. | 263 | - summary listing of command line / boot prompt args for the kernel. |
| 264 | kernel-per-CPU-kthreads.txt | 264 | kernel-per-CPU-kthreads.txt |
diff --git a/Documentation/CodingStyle b/Documentation/CodingStyle index 9a70ddd16584..a096836723ca 100644 --- a/Documentation/CodingStyle +++ b/Documentation/CodingStyle | |||
| @@ -458,7 +458,7 @@ of the function, telling people what it does, and possibly WHY it does | |||
| 458 | it. | 458 | it. |
| 459 | 459 | ||
| 460 | When commenting the kernel API functions, please use the kernel-doc format. | 460 | When commenting the kernel API functions, please use the kernel-doc format. |
| 461 | See the files Documentation/kernel-doc-nano-HOWTO.txt and scripts/kernel-doc | 461 | See the files Documentation/kernel-documentation.rst and scripts/kernel-doc |
| 462 | for details. | 462 | for details. |
| 463 | 463 | ||
| 464 | Linux style for comments is the C89 "/* ... */" style. | 464 | Linux style for comments is the C89 "/* ... */" style. |
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile index d70f9b68174e..01bab5014a4a 100644 --- a/Documentation/DocBook/Makefile +++ b/Documentation/DocBook/Makefile | |||
| @@ -6,6 +6,8 @@ | |||
| 6 | # To add a new book the only step required is to add the book to the | 6 | # To add a new book the only step required is to add the book to the |
| 7 | # list of DOCBOOKS. | 7 | # list of DOCBOOKS. |
| 8 | 8 | ||
| 9 | ifeq ($(IGNORE_DOCBOOKS),) | ||
| 10 | |||
| 9 | DOCBOOKS := z8530book.xml device-drivers.xml \ | 11 | DOCBOOKS := z8530book.xml device-drivers.xml \ |
| 10 | kernel-hacking.xml kernel-locking.xml deviceiobook.xml \ | 12 | kernel-hacking.xml kernel-locking.xml deviceiobook.xml \ |
| 11 | writing_usb_driver.xml networking.xml \ | 13 | writing_usb_driver.xml networking.xml \ |
| @@ -33,10 +35,6 @@ PDF_METHOD = $(prefer-db2x) | |||
| 33 | PS_METHOD = $(prefer-db2x) | 35 | PS_METHOD = $(prefer-db2x) |
| 34 | 36 | ||
| 35 | 37 | ||
| 36 | ### | ||
| 37 | # The targets that may be used. | ||
| 38 | PHONY += xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs cleandocs | ||
| 39 | |||
| 40 | targets += $(DOCBOOKS) | 38 | targets += $(DOCBOOKS) |
| 41 | BOOKS := $(addprefix $(obj)/,$(DOCBOOKS)) | 39 | BOOKS := $(addprefix $(obj)/,$(DOCBOOKS)) |
| 42 | xmldocs: $(BOOKS) | 40 | xmldocs: $(BOOKS) |
| @@ -63,6 +61,9 @@ installmandocs: mandocs | |||
| 63 | sort -k 2 -k 1 | uniq -f 1 | sed -e 's: :/:' | \ | 61 | sort -k 2 -k 1 | uniq -f 1 | sed -e 's: :/:' | \ |
| 64 | xargs install -m 644 -t /usr/local/man/man9/ | 62 | xargs install -m 644 -t /usr/local/man/man9/ |
| 65 | 63 | ||
| 64 | # no-op for the DocBook toolchain | ||
| 65 | epubdocs: | ||
| 66 | |||
| 66 | ### | 67 | ### |
| 67 | #External programs used | 68 | #External programs used |
| 68 | KERNELDOCXMLREF = $(srctree)/scripts/kernel-doc-xml-ref | 69 | KERNELDOCXMLREF = $(srctree)/scripts/kernel-doc-xml-ref |
| @@ -216,10 +217,24 @@ silent_gen_xml = : | |||
| 216 | -e "s/>/\\>/g"; \ | 217 | -e "s/>/\\>/g"; \ |
| 217 | echo "</programlisting>") > $@ | 218 | echo "</programlisting>") > $@ |
| 218 | 219 | ||
| 220 | else | ||
| 221 | |||
| 222 | # Needed, due to cleanmediadocs | ||
| 223 | include Documentation/DocBook/media/Makefile | ||
| 224 | |||
| 225 | htmldocs: | ||
| 226 | pdfdocs: | ||
| 227 | psdocs: | ||
| 228 | xmldocs: | ||
| 229 | installmandocs: | ||
| 230 | |||
| 231 | endif # IGNORE_DOCBOOKS | ||
| 232 | |||
| 233 | |||
| 219 | ### | 234 | ### |
| 220 | # Help targets as used by the top-level makefile | 235 | # Help targets as used by the top-level makefile |
| 221 | dochelp: | 236 | dochelp: |
| 222 | @echo ' Linux kernel internal documentation in different formats:' | 237 | @echo ' Linux kernel internal documentation in different formats (DocBook):' |
| 223 | @echo ' htmldocs - HTML' | 238 | @echo ' htmldocs - HTML' |
| 224 | @echo ' pdfdocs - PDF' | 239 | @echo ' pdfdocs - PDF' |
| 225 | @echo ' psdocs - Postscript' | 240 | @echo ' psdocs - Postscript' |
| @@ -228,8 +243,11 @@ dochelp: | |||
| 228 | @echo ' installmandocs - install man pages generated by mandocs' | 243 | @echo ' installmandocs - install man pages generated by mandocs' |
| 229 | @echo ' cleandocs - clean all generated DocBook files' | 244 | @echo ' cleandocs - clean all generated DocBook files' |
| 230 | @echo | 245 | @echo |
| 231 | @echo 'make DOCBOOKS="s1.xml s2.xml" [target] Generate only docs s1.xml s2.xml' | 246 | @echo ' make DOCBOOKS="s1.xml s2.xml" [target] Generate only docs s1.xml s2.xml' |
| 232 | @echo ' valid values for DOCBOOKS are: $(DOCBOOKS)' | 247 | @echo ' valid values for DOCBOOKS are: $(DOCBOOKS)' |
| 248 | @echo | ||
| 249 | @echo " make IGNORE_DOCBOOKS=1 [target] Don't generate docs from Docbook" | ||
| 250 | @echo ' This is useful to generate only the ReST docs (Sphinx)' | ||
| 233 | 251 | ||
| 234 | 252 | ||
| 235 | ### | 253 | ### |
diff --git a/Documentation/Makefile.sphinx b/Documentation/Makefile.sphinx new file mode 100644 index 000000000000..d8d13c92a178 --- /dev/null +++ b/Documentation/Makefile.sphinx | |||
| @@ -0,0 +1,78 @@ | |||
| 1 | # -*- makefile -*- | ||
| 2 | # Makefile for Sphinx documentation | ||
| 3 | # | ||
| 4 | |||
| 5 | # You can set these variables from the command line. | ||
| 6 | SPHINXBUILD = sphinx-build | ||
| 7 | SPHINXOPTS = | ||
| 8 | PAPER = | ||
| 9 | BUILDDIR = $(obj)/output | ||
| 10 | |||
| 11 | # User-friendly check for sphinx-build | ||
| 12 | HAVE_SPHINX := $(shell if which $(SPHINXBUILD) >/dev/null 2>&1; then echo 1; else echo 0; fi) | ||
| 13 | |||
| 14 | ifeq ($(HAVE_SPHINX),0) | ||
| 15 | |||
| 16 | .DEFAULT: | ||
| 17 | $(warning The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed and in PATH, or set the SPHINXBUILD make variable to point to the full path of the '$(SPHINXBUILD)' executable.) | ||
| 18 | @echo " SKIP Sphinx $@ target." | ||
| 19 | |||
| 20 | else ifneq ($(DOCBOOKS),) | ||
| 21 | |||
| 22 | # Skip Sphinx build if the user explicitly requested DOCBOOKS. | ||
| 23 | .DEFAULT: | ||
| 24 | @echo " SKIP Sphinx $@ target (DOCBOOKS specified)." | ||
| 25 | |||
| 26 | else # HAVE_SPHINX | ||
| 27 | |||
| 28 | # User-friendly check for rst2pdf | ||
