-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: some cleanup and improvements #33395
docs: some cleanup and improvements #33395
Conversation
6cd2b60
to
62cc890
Compare
checkpatch requires a Makefile to be present at the top-level directory. Remove this requirement. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
62cc890
to
4c27a3f
Compare
@@ -59,7 +59,7 @@ if(${LATEXMK} STREQUAL LATEXMK-NOTFOUND) | |||
endif() | |||
|
|||
if(NOT DEFINED SPHINXOPTS) | |||
set(SPHINXOPTS -q) | |||
set(SPHINXOPTS -q -j auto) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏻
4c27a3f
to
bc7cd60
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, glad to see that Makefile
go and -j auto
by default.
@nashif can you take a look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how is having to type:
cmake -GNinja -S doc -Bdoc/_build
ninja -C doc/_build htmldocs
instead of just
make
an improvement?
in order to rebuild docs one can just do
the question here is: why do we want to maintain a top-level Makefile to build the documentation? |
I agree, having a |
lets not pull
Then provide a way or a shortcut (script?) to build docs without having to deal with and remember cmake and ninja options like
|
I think that a shortcut script isn't ideal, what if I want to run Note that CMake command allows for some more simplicity, e.g. taking Ninja out of the game (doesn't add value here other than offering better experience for Windows users): # from `doc` folder
cmake -B_build .
cd _build
make htmldocs
# edit files
make htmldocs
... |
We rejected this in-tree back when we switched from |
right, then leave the Makefile. I am really not sure what problem are we trying to solve here. |
IMO it's about tidiness. A top-level Makefile (a wrapper Makefile to be precise) just for docs is odd. Even more if Make is not actually used as a build system... Would it be possible at least to move it down to docs...? |
I do agree with @gmarull here. That |
In fact, I would argue that it's misleading to have that |
@nashif do you really want to keep this Makefile? I disagree, but we can discuss it. |
if the makefile being in the root is the problem, just move it under doc, Is this acceptable? |
If you insist... but I really think that keeping a Makefile that just wraps a CMake script makes no sense. |
dev-review 2021.03.25:
|
Sphinx supports parallelized build (-j) option. Setting it to `auto` makes use of all available cores. This option seems to speed up the build significantly on multi-core machines. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
ee94d1a
to
981d145
Compare
Move the top-level Makefile to the documentation folder as it is only used for documentation. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
981d145
to
3892248
Compare
@nashif should be ready now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol, too late to the party |
@mbolivar-nordic I've only tried |
#14983 (comment) is the thread where dbkinder mentioned problems |
I'm reading tea leaves here, but basically I think that we are (or at least at some point, we were) relying on a particular serialization of how the .rst files are processed when masking errors in .known-issues. For example -- and again I want to emphasize I am just making an educated guess here since it was @dbkinder, the former docs maintainer, who pointed out the error -- if we get a |
Summary:
auto
makes use of all available cores. This option seems to speed up the build on multi-core machines, even though not much when Kconfig is enabled.Quick comparison on
-j auto
usage (cpu count=12):KCONFIG_TURBO_MODE=0
SPHINXOPTS=
:ninja -C doc/_build htmldocs 650.51s user 8.50s system 100% cpu 10:55.39 total
SPHINXOPTS=-j auto
:ninja -C doc/_build htmldocs 2094.90s user 62.44s system 368% cpu 9:46.23 total
KCONFIG_TURBO_MODE=1
:SPHINXOPTS=
:ninja -C doc/_build htmldocs 303.29s user 4.48s system 101% cpu 5:04.46 total
SPHINXOPTS=-j auto
:ninja -C doc/_build htmldocs 1060.54s user 21.20s system 555% cpu 3:14.64 total