Commit 63ac0cf9 authored by Jonathan Corbet's avatar Jonathan Corbet

Merge branch 'sphinx-fixes-for-docs-next' of git://people.freedesktop.org/~jani/drm into test

A set of PDF and other docs related fixes from Jani.
parents ac72618f 07c7e30c
...@@ -10,6 +10,8 @@ _SPHINXDIRS = $(patsubst $(srctree)/Documentation/%/conf.py,%,$(wildcard $(src ...@@ -10,6 +10,8 @@ _SPHINXDIRS = $(patsubst $(srctree)/Documentation/%/conf.py,%,$(wildcard $(src
SPHINX_CONF = conf.py SPHINX_CONF = conf.py
PAPER = PAPER =
BUILDDIR = $(obj)/output BUILDDIR = $(obj)/output
PDFLATEX = xelatex
LATEXOPTS = -interaction=batchmode
# User-friendly check for sphinx-build # User-friendly check for sphinx-build
HAVE_SPHINX := $(shell if which $(SPHINXBUILD) >/dev/null 2>&1; then echo 1; else echo 0; fi) HAVE_SPHINX := $(shell if which $(SPHINXBUILD) >/dev/null 2>&1; then echo 1; else echo 0; fi)
...@@ -29,7 +31,7 @@ else ifneq ($(DOCBOOKS),) ...@@ -29,7 +31,7 @@ else ifneq ($(DOCBOOKS),)
else # HAVE_SPHINX else # HAVE_SPHINX
# User-friendly check for pdflatex # User-friendly check for pdflatex
HAVE_PDFLATEX := $(shell if which xelatex >/dev/null 2>&1; then echo 1; else echo 0; fi) HAVE_PDFLATEX := $(shell if which $(PDFLATEX) >/dev/null 2>&1; then echo 1; else echo 0; fi)
# Internal variables. # Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_a4 = -D latex_paper_size=a4
...@@ -51,7 +53,7 @@ loop_cmd = $(echo-cmd) $(cmd_$(1)) ...@@ -51,7 +53,7 @@ loop_cmd = $(echo-cmd) $(cmd_$(1))
# $5 reST source folder relative to $(srctree)/$(src), # $5 reST source folder relative to $(srctree)/$(src),
# e.g. "media" for the linux-tv book-set at ./Documentation/media # e.g. "media" for the linux-tv book-set at ./Documentation/media
quiet_cmd_sphinx = SPHINX $@ --> file://$(abspath $(BUILDDIR)/$3/$4); quiet_cmd_sphinx = SPHINX $@ --> file://$(abspath $(BUILDDIR)/$3/$4)
cmd_sphinx = $(MAKE) BUILDDIR=$(abspath $(BUILDDIR)) $(build)=Documentation/media all;\ cmd_sphinx = $(MAKE) BUILDDIR=$(abspath $(BUILDDIR)) $(build)=Documentation/media all;\
BUILDDIR=$(abspath $(BUILDDIR)) SPHINX_CONF=$(abspath $(srctree)/$(src)/$5/$(SPHINX_CONF)) \ BUILDDIR=$(abspath $(BUILDDIR)) SPHINX_CONF=$(abspath $(srctree)/$(src)/$5/$(SPHINX_CONF)) \
$(SPHINXBUILD) \ $(SPHINXBUILD) \
...@@ -67,16 +69,19 @@ htmldocs: ...@@ -67,16 +69,19 @@ htmldocs:
@$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,html,$(var),,$(var))) @$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,html,$(var),,$(var)))
latexdocs: latexdocs:
@$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,latex,$(var),latex,$(var)))
ifeq ($(HAVE_PDFLATEX),0) ifeq ($(HAVE_PDFLATEX),0)
$(warning The 'xelatex' command was not found. Make sure you have it installed and in PATH to produce PDF output.)
pdfdocs:
$(warning The '$(PDFLATEX)' command was not found. Make sure you have it installed and in PATH to produce PDF output.)
@echo " SKIP Sphinx $@ target." @echo " SKIP Sphinx $@ target."
else # HAVE_PDFLATEX else # HAVE_PDFLATEX
@$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,latex,$(var),latex,$(var)))
endif # HAVE_PDFLATEX
pdfdocs: latexdocs pdfdocs: latexdocs
ifneq ($(HAVE_PDFLATEX),0) $(foreach var,$(SPHINXDIRS), $(MAKE) PDFLATEX=$(PDFLATEX) LATEXOPTS="$(LATEXOPTS)" -C $(BUILDDIR)/$(var)/latex;)
$(foreach var,$(SPHINXDIRS), $(MAKE) PDFLATEX=xelatex LATEXOPTS="-interaction=nonstopmode" -C $(BUILDDIR)/$(var)/latex)
endif # HAVE_PDFLATEX endif # HAVE_PDFLATEX
epubdocs: epubdocs:
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -66,7 +66,9 @@ other program after you have done the following: ...@@ -66,7 +66,9 @@ other program after you have done the following:
Both the javawrapper shellscript and the javaclassname program Both the javawrapper shellscript and the javaclassname program
were supplied by Colin J. Watson <cjw44@cam.ac.uk>. were supplied by Colin J. Watson <cjw44@cam.ac.uk>.
Javawrapper shell script:: Javawrapper shell script:
.. code-block:: sh
#!/bin/bash #!/bin/bash
# /usr/local/bin/javawrapper - the wrapper for binfmt_misc/java # /usr/local/bin/javawrapper - the wrapper for binfmt_misc/java
...@@ -155,29 +157,31 @@ Javawrapper shell script:: ...@@ -155,29 +157,31 @@ Javawrapper shell script::
shift shift
/usr/bin/java $FQCLASS "$@" /usr/bin/java $FQCLASS "$@"
javaclassname.c:: javaclassname.c:
.. code-block:: c
/* javaclassname.c /* javaclassname.c
* *
* Extracts the class name from a Java class file; intended for use in a Java * Extracts the class name from a Java class file; intended for use in a Java
* wrapper of the type supported by the binfmt_misc option in the Linux kernel. * wrapper of the type supported by the binfmt_misc option in the Linux kernel.
* *
* Copyright (C) 1999 Colin J. Watson <cjw44@cam.ac.uk>. * Copyright (C) 1999 Colin J. Watson <cjw44@cam.ac.uk>.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
...@@ -378,7 +382,9 @@ added to your CLASSPATH during execution. ...@@ -378,7 +382,9 @@ added to your CLASSPATH during execution.
To test your new setup, enter in the following simple Java app, and name To test your new setup, enter in the following simple Java app, and name
it "HelloWorld.java":: it "HelloWorld.java":
.. code-block:: java
class HelloWorld { class HelloWorld {
public static void main(String args[]) { public static void main(String args[]) {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -31,7 +31,9 @@ other program after you have done the following: ...@@ -31,7 +31,9 @@ other program after you have done the following:
more about the configuration process. more about the configuration process.
3) Add the following entries to ``/etc/rc.local`` or similar script 3) Add the following entries to ``/etc/rc.local`` or similar script
to be run at system startup:: to be run at system startup:
.. code-block:: sh
# Insert BINFMT_MISC module into the kernel # Insert BINFMT_MISC module into the kernel
if [ ! -e /proc/sys/fs/binfmt_misc/register ]; then if [ ! -e /proc/sys/fs/binfmt_misc/register ]; then
......
...@@ -78,7 +78,9 @@ Setting the ramoops parameters can be done in several different manners: ...@@ -78,7 +78,9 @@ Setting the ramoops parameters can be done in several different manners:
}; };
C. Use a platform device and set the platform data. The parameters can then C. Use a platform device and set the platform data. The parameters can then
be set through that platform data. An example of doing that is:: be set through that platform data. An example of doing that is:
.. code-block:: c
#include <linux/pstore_ram.h> #include <linux/pstore_ram.h>
[...] [...]
......
...@@ -136,7 +136,7 @@ pygments_style = 'sphinx' ...@@ -136,7 +136,7 @@ pygments_style = 'sphinx'
todo_include_todos = False todo_include_todos = False
primary_domain = 'C' primary_domain = 'C'
highlight_language = 'guess' highlight_language = 'none'
# -- Options for HTML output ---------------------------------------------- # -- Options for HTML output ----------------------------------------------
...@@ -336,7 +336,7 @@ latex_elements = { ...@@ -336,7 +336,7 @@ latex_elements = {
# (source start file, target name, title, # (source start file, target name, title,
# author, documentclass [howto, manual, or own class]). # author, documentclass [howto, manual, or own class]).
latex_documents = [ latex_documents = [
('user/index', 'linux-user.tex', 'Linux Kernel User Documentation', ('admin-guide/index', 'linux-user.tex', 'Linux Kernel User Documentation',
'The kernel development community', 'manual'), 'The kernel development community', 'manual'),
('kernel-documentation', 'kernel-documentation.tex', 'The Linux Kernel Documentation', ('kernel-documentation', 'kernel-documentation.tex', 'The Linux Kernel Documentation',
'The kernel development community', 'manual'), 'The kernel development community', 'manual'),
......
...@@ -201,7 +201,9 @@ Appendix A: gather_on_build.sh ...@@ -201,7 +201,9 @@ Appendix A: gather_on_build.sh
------------------------------ ------------------------------
Sample script to gather coverage meta files on the build machine Sample script to gather coverage meta files on the build machine
(see 6a):: (see 6a):
.. code-block:: sh
#!/bin/bash #!/bin/bash
...@@ -232,7 +234,9 @@ Appendix B: gather_on_test.sh ...@@ -232,7 +234,9 @@ Appendix B: gather_on_test.sh
----------------------------- -----------------------------
Sample script to gather coverage data files on the test machine Sample script to gather coverage data files on the test machine
(see 6b):: (see 6b):
.. code-block:: sh
#!/bin/bash -e #!/bin/bash -e
......
...@@ -24,7 +24,9 @@ Profiling data will only become accessible once debugfs has been mounted:: ...@@ -24,7 +24,9 @@ Profiling data will only become accessible once debugfs has been mounted::
mount -t debugfs none /sys/kernel/debug mount -t debugfs none /sys/kernel/debug
The following program demonstrates kcov usage from within a test program:: The following program demonstrates kcov usage from within a test program:
.. code-block:: c
#include <stdio.h> #include <stdio.h>
#include <stddef.h> #include <stddef.h>
......
...@@ -215,7 +215,7 @@ Connectors state change detection must be cleanup up with a call to ...@@ -215,7 +215,7 @@ Connectors state change detection must be cleanup up with a call to
Output discovery and initialization example Output discovery and initialization example
------------------------------------------- -------------------------------------------
:: .. code-block:: c
void intel_crt_init(struct drm_device *dev) void intel_crt_init(struct drm_device *dev)
{ {
......
...@@ -45,7 +45,7 @@ the radeon_ttm.c file for an example of usage. ...@@ -45,7 +45,7 @@ the radeon_ttm.c file for an example of usage.
The ttm_global_reference structure is made up of several fields: The ttm_global_reference structure is made up of several fields:
:: .. code-block:: c
struct ttm_global_reference { struct ttm_global_reference {
enum ttm_global_types global_type; enum ttm_global_types global_type;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment