Skip to content

Commit 881d39f

Browse files
committed
doc: nrfx: switch to Doxygen-only docset
We are now serving Doxygen content, so let's drop the redundant Sphinx "shim". Signed-off-by: Gerard Marull-Paretas <[email protected]>
1 parent 4ce6484 commit 881d39f

File tree

9 files changed

+621
-401
lines changed

9 files changed

+621
-401
lines changed

.github/workflows/docbuild.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,26 @@ jobs:
139139
popd
140140
done
141141
142+
# Doxygen APIs standalone
143+
declare -a DOXYGEN=("nrfx")
144+
145+
for docset in "${DOXYGEN[@]}"; do
146+
OUTDIR=doc/_build/html/$docset
147+
148+
# Populate custom.properties, tags.yml
149+
cp doc/_zoomin/$docset.apis.custom.properties "$OUTDIR/custom.properties"
150+
sed -i 's/__VERSION__/'"$VERSION"'/g' "$OUTDIR/custom.properties"
151+
152+
cp doc/_zoomin/$docset.apis.tags.yml "$OUTDIR/tags.yml"
153+
sed -i 's/__VERSION__/'"$VERSION"'/g' "$OUTDIR/tags.yml"
154+
155+
pushd "$OUTDIR"
156+
ARCHIVE="$docset-apis-$VERSION.zip"
157+
zip -rq "$ARCHIVE" .
158+
mv "$ARCHIVE" "$ROOT"
159+
popd
160+
done
161+
142162
# NCS
143163
OUTDIR=doc/_build/html
144164

doc/CMakeLists.txt

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,36 @@ file(MAKE_DIRECTORY ${KCONFIG_BINARY_DIR})
5050
#-------------------------------------------------------------------------------
5151
# Functions
5252

53+
# Add a new Doxygen docset.
54+
#
55+
# Args:
56+
# - name: Docset name.
57+
# - sources: Sources.
58+
#
59+
# Configured targets:
60+
# - ${name}: Run Doxygen build.
61+
# - ${name}-clean: Clean build artifacts.
62+
#
63+
function(add_doxygen_docset name sources)
64+
set(DOCSET_BUILD_DIR ${CMAKE_BINARY_DIR}/html)
65+
set(DOCSET_SOURCE_BASE ${sources})
66+
67+
configure_file(${CMAKE_CURRENT_LIST_DIR}/${name}/${name}.doxyfile.in ${CMAKE_BINARY_DIR}/${name}.doxyfile)
68+
69+
add_custom_target(
70+
${name}
71+
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOCSET_BUILD_DIR}
72+
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/${name}.doxyfile
73+
USES_TERMINAL
74+
COMMENT "Building ${name} docset..."
75+
)
76+
77+
add_custom_target(
78+
${name}-clean
79+
COMMAND ${CMAKE_COMMAND} -E rm -rf ${DOCSET_BUILD_DIR}
80+
)
81+
endfunction()
82+
5383
# Add a new docset.
5484
#
5585
# Args:
@@ -223,7 +253,7 @@ add_docset(mcuboot)
223253
#-------------------------------------------------------------------------------
224254
# docset: nrfx
225255

226-
add_docset(nrfx DODGY)
256+
add_doxygen_docset(nrfx ${ZEPHYR_HAL_NORDIC_MODULE_DIR})
227257

228258
#-------------------------------------------------------------------------------
229259
# docset: tfm
@@ -274,7 +304,6 @@ add_custom_target(
274304

275305
add_dependencies(merge-search-indexes
276306
nrf-all
277-
nrfx-all
278307
nrfxlib-all
279308
zephyr-all
280309
mcuboot-all
@@ -297,7 +326,7 @@ add_dependencies(build-all
297326
copy-extra-content
298327
merge-search-indexes
299328
nrf-all
300-
nrfx-all
329+
nrfx
301330
nrfxlib-all
302331
zephyr-all
303332
mcuboot-all

doc/_utils/utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222
ALL_DOCSETS = {
2323
"nrf": ("nRF Connect SDK", "index", "manifest"),
24-
"nrfx": ("nrfx", "index", "hal_nordic"),
2524
"nrfxlib": ("nrfxlib", "README", "nrfxlib"),
2625
"zephyr": ("Zephyr Project", "index", "zephyr"),
2726
"mcuboot": ("MCUboot", "wrapper", "mcuboot"),
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
manual.name=nrfx-apis-__VERSION__
2+
booktitle=nrfx APIs - __VERSION__

doc/_zoomin/nrfx.apis.tags.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Document tags for Zoomin.
2+
3+
# Tags for all topics:
4+
mapping_global:
5+
- nrfx-apis
6+
- nrfx-apis-__VERSION__
7+
8+
# Tags for individual topics:
9+
mapping_topics: []

doc/nrf/conf.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,6 @@
110110
if kconfig_mapping:
111111
intersphinx_mapping["kconfig"] = kconfig_mapping
112112

113-
nrfx_mapping = utils.get_intersphinx_mapping("nrfx")
114-
if nrfx_mapping:
115-
intersphinx_mapping["nrfx"] = nrfx_mapping
116-
117113
matter_mapping = utils.get_intersphinx_mapping("matter")
118114
if matter_mapping:
119115
intersphinx_mapping["matter"] = matter_mapping

doc/nrfx/conf.py

Lines changed: 0 additions & 73 deletions
This file was deleted.

0 commit comments

Comments
 (0)