Skip to content

Commit a239060

Browse files
committed
Merge pull request #1239 from UncleGrumpy/docs_build-configs_warnings
Docs build config changes to address warnings and improve rendering The combined effect of these changes greatly reduces the number of warning emitted when building the documentation, and improve some rendering. Several more source files are omitted from the documentation build process that do not add any information to the documentation but confuse the build system leading to many warnings and some rendering errors. There are notes in each commit about the various configuration changes. These changes are made under both the "Apache 2.0" and the "GNU Lesser General Public License 2.1 or later" license terms (dual license). SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
2 parents 0396066 + 23eb786 commit a239060

File tree

5 files changed

+26
-10
lines changed

5 files changed

+26
-10
lines changed

doc/CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,22 @@ file(COPY ${CMAKE_SOURCE_DIR}/LICENSES/Apache-2.0.txt DESTINATION ${CMAKE_CURREN
3232
file(COPY ${CMAKE_SOURCE_DIR}/SECURITY.md DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/src)
3333
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/release-notes.md.in ${CMAKE_CURRENT_BINARY_DIR}/src/release-notes.md @ONLY)
3434
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/edoc/edown_dep DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/edoc/)
35+
target_compile_definitions(libAtomVM PUBLIC AVM_TASK_DRIVER_ENABLED)
3536

3637
# Configure libAtomVM restucturedtext skeleton.
3738
file(GLOB SOURCE_FILES LIST_DIRECTORIES false RELATIVE ${CMAKE_SOURCE_DIR}/src/libAtomVM/ ${CMAKE_SOURCE_DIR}/src/libAtomVM/*.c ${CMAKE_SOURCE_DIR}/src/libAtomVM/*.h)
39+
set(OMIT_FILES
40+
"defaultatoms.c"
41+
"opcodesswitch.h"
42+
"scheduler.c"
43+
"tempstack.h"
44+
)
3845
foreach(SOURCE_FILE ${SOURCE_FILES})
3946
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/apidocs/libatomvm/file.rst.in ${CMAKE_CURRENT_BINARY_DIR}/src/apidocs/libatomvm/src/${SOURCE_FILE}.rst @ONLY)
4047
endforeach(SOURCE_FILE)
48+
foreach(OMIT ${OMIT_FILES})
49+
file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/src/apidocs/libatomvm/src/${OMIT}.rst)
50+
endforeach(OMIT)
4151

4252
# Support for edoc -> markdown.
4353
add_custom_target(edown-escript

doc/Doxyfile.in

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ EXTRACT_PACKAGE = NO
465465
# included in the documentation.
466466
# The default value is: NO.
467467

468-
EXTRACT_STATIC = NO
468+
EXTRACT_STATIC = YES
469469

470470
# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined
471471
# locally in source files will be included in the documentation. If set to NO,
@@ -520,7 +520,7 @@ HIDE_FRIEND_COMPOUNDS = NO
520520
# blocks will be appended to the function's detailed documentation block.
521521
# The default value is: NO.
522522

523-
HIDE_IN_BODY_DOCS = NO
523+
HIDE_IN_BODY_DOCS = YES
524524

525525
# The INTERNAL_DOCS tag determines if documentation that is typed after a
526526
# \internal command is included. If the tag is set to NO then the documentation
@@ -692,7 +692,7 @@ SHOW_FILES = YES
692692
# Folder Tree View (if specified).
693693
# The default value is: YES.
694694

695-
SHOW_NAMESPACES = YES
695+
SHOW_NAMESPACES = NO
696696

697697
# The FILE_VERSION_FILTER tag can be used to specify a program or script that
698698
# doxygen should invoke to get the current version for each file (typically from
@@ -769,7 +769,7 @@ WARN_IF_DOC_ERROR = YES
769769
# EXTRACT_ALL is set to YES then this flag will automatically be disabled.
770770
# The default value is: NO.
771771

772-
WARN_NO_PARAMDOC = NO
772+
WARN_NO_PARAMDOC = YES
773773

774774
# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when
775775
# a warning is encountered.
@@ -903,7 +903,7 @@ EXCLUDE_SYMLINKS = NO
903903
# Note that the wildcards are matched against the file with absolute path, so to
904904
# exclude all test directories for example use the pattern */test/*
905905

906-
EXCLUDE_PATTERNS = */libAtomVM/opcodesswitch.h
906+
EXCLUDE_PATTERNS = */defaultatoms.c */opcodesswitch.h */scheduler.c */tempstack.h
907907

908908
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
909909
# (namespaces, classes, functions, etc.) that should be excluded from the
@@ -1015,7 +1015,7 @@ SOURCE_BROWSER = YES
10151015
# classes and enums directly into the documentation.
10161016
# The default value is: NO.
10171017

1018-
INLINE_SOURCES = NO
1018+
INLINE_SOURCES = YES
10191019

10201020
# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any
10211021
# special comment blocks from generated source code fragments. Normal C, C++ and
@@ -2030,7 +2030,7 @@ ENABLE_PREPROCESSING = YES
20302030
# The default value is: NO.
20312031
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
20322032

2033-
MACRO_EXPANSION = NO
2033+
MACRO_EXPANSION = YES
20342034

20352035
# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
20362036
# the macro expansion is limited to the macros specified with the PREDEFINED and
@@ -2070,7 +2070,7 @@ INCLUDE_FILE_PATTERNS =
20702070
# recursively expanded use the := operator instead of the = operator.
20712071
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
20722072

2073-
PREDEFINED = DOXYGEN_SKIP_SECTION
2073+
PREDEFINED = DOXYGEN_SKIP_SECTION AVM_TASK_DRIVER_ENABLED ENABLE_ADVANCED_TRACE OTP_SOCKET_LWIP
20742074

20752075
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
20762076
# tag can be used to specify a list of macro names that should be expanded. The
@@ -2316,7 +2316,7 @@ DOT_IMAGE_FORMAT = png
23162316
# The default value is: NO.
23172317
# This tag requires that the tag HAVE_DOT is set to YES.
23182318

2319-
INTERACTIVE_SVG = NO
2319+
INTERACTIVE_SVG = YES
23202320

23212321
# The DOT_PATH tag can be used to specify the path where the dot tool can be
23222322
# found. If left blank, it is assumed the dot tool can be found in the path.

doc/conf.py.in

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ extensions = [
6363
suppress_warnings = [
6464
'epub.unknown_project_files',
6565
'misc.highlighting_failure',
66-
'toc.excluded'
66+
'toc.excluded',
67+
'myst.*',
68+
'breathe.*'
6769
]
6870

6971
# Add any paths that contain templates here, relative to this directory.

doc/pdf_stylesheet.rts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ base = sphinx
88

99
[linked reference]
1010
type = custom
11+
12+
[chapter]
13+
page_break = any

doc/src/apidocs/libatomvm/file.rst.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
:orphan:
66

77
.. c:namespace:: libAtomVM
8+
.. c:namespace-push:: @SOURCE_FILE@
89

910
------------------
1011
@SOURCE_FILE@

0 commit comments

Comments
 (0)