Commit graph

62 commits

Author SHA1 Message Date
Ulf Magnusson a56be6f58d Kconfiglib: Fix $srctree behavior for the top-level Kconfig file
Due a design goof, the top-level Kconfig file passed to
Kconfig.__init__() wasn't looked up relative to $srctree. This broke a
planned fix for an issue with the CI check for references to undefined
Kconfig files in external projects.

Update Kconfiglib to upstream revision 953cc12464 to fix it.

Also update doc/CMakeLists.txt to pass 'Kconfig' instead of '../Kconfig'
to genrest.py. $srctree is already set to $ZEPHYR_BASE.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-08-18 10:38:52 +02:00
Carles Cufi 896a6966f8 doc: Make Sphinx output directory configurable
In order to be able to place the generated HTML content directly in a
folder of the user's choice, make the Sphinx HTML output folder
configurable.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-08-16 14:40:12 +02:00
Carles Cufi d6c56d57c3 doc: Remove unnecessary copy statements
Since we're now copying the whole doc/ folder into the output folder,
there's no need anymore to copy certain files by hand.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-08-07 21:31:38 +02:00
Carles Cufi a0dbc7aa4b doc: Copy all doc/ contents and not just .rst files
To avoid having to refer to non-rst files artificially in order to get
them copied into the destination folder, make a raw full copy of the
doc/ folder instead of copying only the .rst files.

Fixes #9128

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-08-06 21:56:57 +02:00
Carles Cufi e182dbc22e doc: cmake: Enable out-of-tree builds
The following changes have been made to support out-of-tree builds:

* In order to avoid using relative hardcoded paths, use CMake's
  configure_file() to replace the paths in the doxygen input file
  so that the output directory is set correctly.
* All .rst and additional required files are now copied from the doc/
  folder into the build/rst folder using extract_content.py. The
  samples/ and boards/ folder are copied twice (once into build/rst
  and another into build/doc/rst) to manage relative paths.
* All paths are absolute where possible, including themes and static
  content.

This patch ensures that the Zephyr repo is not contaminated by the
build at all.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-07-19 08:44:41 -04:00
Carles Cufi 60c5540dbf doc: cmake: Conditionally add USES_TERMINAL to html targets
When using Ninja, output will be buffered until the command completes
unless USES_TERMINAL is used. Use USES_TERMINAL here so that output is
sent directly to the terminal without having to wait. This is a bit of
an abuse of the Ninja console pool, but for building documentation this
should not be an issue since it's a self-contained CMake project.
Note that this is done conditionally, only when Sphinx output is not
disabled by using its "-q" flag.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-07-17 11:08:25 +02:00
Carles Cufi 7896451713 doc: cmake: Use proper dependencies
Properly use add_dependencies() instead of DEPENDS for the custom
targets.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-07-17 11:08:25 +02:00
Carles Cufi 2af9a9e628 doc: cmake: Use flexible variables for inclusion
In order to be able to use this CMakeLists.txt file from other projects,
use the proper variables so that they refer to their own paths.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-07-13 19:26:22 +02:00
Carles Cufi d505ca7081 doc: cmake: Fix argument parsing
Fix the way a list is constructed during argument parsing so that CMake
propagates the options correctly to Sphinx.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-07-13 07:25:02 -04:00
Carles Cufi 247ca67cea doc: sphinx: Reshuffle sphinx cmd-line options
Move options to the place they belong ([OPTIONS] SOURCEDIR OUTPUTDIR)
according to sphinx itself.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-07-12 23:11:46 -04:00
Carles Cufi 45d58a7bb1 cmake: Rename process.cmake to reflect contents
Rename process.cmake to reflect its contents: executing the CMake
command "execute_process".

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-07-12 23:11:46 -04:00
Carles Cufi ae69934cb9 doc: Support building with CMake
Add a new CMakeLists.txt that is capable of building the documentation.
Note that the error checkin currently only works on Unix platforms since
it's tied to a shell script.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-07-12 01:26:05 +02:00