Commit graph

73 commits

Author SHA1 Message Date
Sebastian Bøe 43bc30466a Revert "doc: Kconfig: Decode Kconfig sources as UTF-8 instead [...]"
This reverts commit f8d451258e. The
revert is done because of a regression in Mac OSX
https://github.com/zephyrproject-rtos/zephyr/issues/6726

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-03-21 08:57:44 -04:00
Sebastian Bøe f8d451258e doc: Kconfig: Decode Kconfig sources as UTF-8 instead of as LC_CTYPE
Decode Kconfig sources as UTF-8 instead of decoding them according to
the system locale (which might be ascii-only).

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-03-20 12:07:02 -04:00
Inaky Perez-Gonzalez aa765005e8 doc/scripts/filter-doc-log: protect further against bad TERM env
Checking for TERM being undefined before doing tput with colors is not
enough; if TERM is defined as 'dumb', this thing also behaves dumbly.

In fact, the whole trying to do colors thing is dumb and causes all
kinds of headache in corner cases, so just wrap anything smelling like
color in a check for TERM being undefined or 'dumb' and be done with
it.

It shall take care of different automation mechanisms that don't
invoke 'make htmldocs' from a user console.

Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2017-12-22 08:36:39 -05:00
Inaky Perez-Gonzalez 22f22c2fc2 filter-doc-log.sh: don't use tput if TERM is not defined
When running on jenkins and other automation environment, TERM will
not be defined and thus tput errors out.

Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2017-12-13 16:10:53 -05:00
David B. Kinder be49790ff3 doc: fix handling of OPTION directive in genrest
The genrest.py script used to create configuration options documentation
from the KConfig files generates slightly incorrect OPTION directives
(with an extra colon at the end).  Sphinx 1.5 didn't care, but Sphinx
1.6 does, so fix this now in preparation for upgrading Sphinx to the
current version.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-12-02 10:16:03 -05:00
Anas Nashif e754d44791 doc: report which warnings/errors are new
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-11-13 17:45:42 -05:00
David B. Kinder d3b0cd4827 doc: move docgen filter out of shippable script
Because of known issues with Sphinx/Breathe tools we're using to
generate doxygen-based comments for our API documentation, we're getting
a bevy of warning messages written out. As a workaround for our CI
system, we created a filter-known-issues.py script to remove "expected"
warnings from the output.

This patch moves calling that filter script into the doc generation
Makefile so folks making local builds of the docs won't be tripped up by
all the warning messages either.  Output of the "make htmldocs" command
is now filtered so only "unexpected" errors and warnings will be shown.

(See https://github.com/sphinx-doc/sphinx/issue/2682 and
sphinx-doc/sphinx#2683i for the Sphinx/Breathe issues.)

Fixes #1527

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-09-22 08:07:30 -04:00
David B. Kinder aea3038633 doc: genrest writing files without final newline
The script used to generate Kconfig documentation (genrest.py)
was creating .rst files without a final newline.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-09-06 18:37:55 -05:00
David B. Kinder 014d5f7d80 doc: output alphabetic Kconfig options index
Instead of a configuration options index in "discovered" order
during the walk of the Kconfig files, create the index in alphabetic
order.

Also added a more descriptive name above the displayed table and added
table headings.

jira: ZEP-2310

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-07-20 13:48:11 -07:00
David Brown 53266a3836 doc: Fix encoding problem
Depending on the version of Python 3 the user has installed, 'open'
may default to using 'ascii' encoding.  Since the documentation is in
UTF-8, and contains characters beyond 'ascii', this will result in
failures when using these versions of Python.

Fix this by being explicit about the encoding to be used when reading
these files.

Signed-off-by: David Brown <david.brown@linaro.org>
Change-Id: I54c69334c6bf377f1135cec04f4e0ea96a8e9a5b
2017-02-09 23:37:44 +00:00
David B. Kinder ac74d8b652 license: Replace Apache boilerplate with SPDX tag
Replace the existing Apache 2.0 boilerplate header with an SPDX tag
throughout the zephyr code tree. This patch was generated via a
script run over the master branch.

Also updated doc/porting/application.rst that had a dependency on
line numbers in a literal include.

Manually updated subsys/logging/sys_log.c that had a malformed
header in the original file.  Also cleanup several cases that already
had a SPDX tag and we either got a duplicate or missed updating.

Jira: ZEP-1457

Change-Id: I6131a1d4ee0e58f5b938300c2d2fc77d2e69572c
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-01-19 03:50:58 +00:00
Anas Nashif 06382b8cba doc: move context back to doc/, fix broken links
Running documentation scripts on the top directory shifted all links one
level dowwn and is breaking all incoming links.

Use a script to copy all RST files into the doc/ directory before
running sphinx and keep structure intact.

Jira: ZEP-1579
Change-Id: Iccff068430e2ddb29e172cd8ae920475815d199e
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-01-16 18:05:06 -05:00
David B. Kinder f01601b935 doc: fix title generation for config options pages
Use the ReST metadata document title directive instead of
embedded javascript to assign a title to the configuration
options (Kconfig) reference guide pages.  This will generate
a static <title> directive in the generated HTML instead
of relying on javascript.

Change-Id: Ib70a8b1f641a5ed72be774f0f5b2a93a2d1c9b8c
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2016-09-20 20:30:18 +00:00
David Kinder 9c9ee5da8f doc: fix missing titles on kconfig reference entry HTML files
Add a document.title='xxx' via on-page javascript for the
.rst files generated by the genrest.py script

Jira: ZEP-459
Change-Id: I2b3dbb97758cfa232006a0cd98c4bd8394d8183e
Signed-off-by: David Kinder <david.b.kinder@intel.com>
2016-06-17 16:45:08 +00:00
Inaky Perez-Gonzalez 0efb479fcc doc: declare CONFIG_XYZ with .. option:: vs a header
This allows us to cross ref from code with :option:`CONFIG_XYZ`
generating a useful link and avoiding an 'undefined target` warning.

Hyperlink using :option: instead of :ref:.

Change-Id: I6cc0daec012dfcca504faa47d591885e69c8e521
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-06-14 20:00:51 +00:00
Anas Nashif 0f515c1497 doc: use table for Kconfig option reference
Do not use a TOC, instead put all options in a table and use references.

Jira: ZEP-149
Change-Id: I23821759c64ce28241ee8260ad7cba235df72d86
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-11 15:15:44 +00:00
Anas Nashif 35360df9be doc: index config variable only once
The index.rst file should reference variables only once.

Jira: ZEP-148
Change-Id: Ia5aad1d3ccd0f7c93fca94f1fa0ad88171eaf5c1
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-23 01:02:19 +00:00
Yannis Damigos 79d0a339f5 doc: Documentation generator failed for html format
Fixed some indentation errors in scripts/genrest/kconfiglib.py
which cause generation of html format documentation to fail

Change-Id: I228f528d49722549f6034a572049db4b9d735615
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2016-03-01 16:53:51 +00:00
Anas Nashif df8db31f53 doc: add brief description for Kconfig in the reference
Change-Id: I8ba54feb9d684945177c7ecfb08255aaf796734f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-09 18:04:36 +00:00
Peter Mitsis 3fc5e279d5 doc: Update Kconfig documentation tool 'genrest'
Updates the 'genrest' documentation tool to fix the following types of
warnings and errors:
	WARNING: Field list ends without a blank line; unexpected unindent.
	WARNING: Block quote ends without a blank line; unexpected unindent.
	ERROR: Unknown target name: "<insert kconfig option here>"

Change-Id: I926afcab24a3032923b470dd31ac6ae11d0fc689
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:24:54 -05:00
Anas Nashif 90f07a9dd0 doc: support globbing when creating kconfig docs
When generating documentation for kconfig options, support
wildcards to be able to parse all relevant files.

Change-Id: Ifa565e3809996fcd13b0f15d61a4ffb108c1aa0a
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:52 -05:00
Anas Nashif 68f6032006 doc: fixed inclusion of files to avoid warnings
Change-Id: I454a998851f3546f98601ff3b24770e32cf3b268

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:34 -05:00
Anas Nashif dada389eb1 generate kconfig variables automatically
Change-Id: Iba70557100f49209edb6874251f93f79c2358737
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:35 -05:00