Skip to content

Commit

Permalink
doc: Generate hyperlinks to manuals of utilities
Browse files Browse the repository at this point in the history
Instead of hardcoding hyperlinks to the man pages of Libiio utils,
generate them based on the config.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
  • Loading branch information
pcercuei committed May 11, 2023
1 parent 459d815 commit eacddbf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Expand Up @@ -536,6 +536,10 @@ if(WITH_DOC)
DESTINATION ${CMAKE_HTML_DEST_DIR}/${CMAKE_API_DEST_DIR}
FILES_MATCHING PATTERN "*.svg")
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/doc/html/ DESTINATION ${CMAKE_HTML_DEST_DIR})
set(IIO_TESTS_MAN_PAGES_HTML "")
foreach(_page ${IIO_TESTS_TARGETS})
set(IIO_TESTS_MAN_PAGES_HTML "${IIO_TESTS_MAN_PAGES_HTML}<li><a href=\"./man1/${_page}.1.html\">${_page}</a></li>")
endforeach()
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/doc/index.html.in
${CMAKE_HTML_DEST_DIR}/index.html @ONLY)
Expand Down
16 changes: 1 addition & 15 deletions doc/index.html.in
Expand Up @@ -130,21 +130,7 @@
<li>
<a href="./man3/libiio.3.html">libiio</a>
</li>
<li>
<a href="./man1/iio_attr.1.html">iio_attr</a>
</li>
<li>
<a href="./man1/iio_info.1.html">iio_info</a>
</li>
<li>
<a href="./man1/iio_readdev.1.html">iio_readdev</a>
</li>
<li>
<a href="./man1/iio_reg.1.html">iio_reg</a>
</li>
<li>
<a href="./man1/iio_writedev.1.html">iio_writedev</a>
</li>
@IIO_TESTS_MAN_PAGES_HTML@
</ul>
</div>
</div>
Expand Down

0 comments on commit eacddbf

Please sign in to comment.