From 6f96639d25e3c6103048aa9809420e897970def0 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Tue, 4 Feb 2020 14:37:19 -0800 Subject: cmake/doxygen: Fix FPGA manual post-FPGA-merge While merging the FPGA code into the UHD codebase, the manual building process was not modified, resulting in either a link to the website instead of building the FPGA manual as part of the rest, or by using a residual submodule. --- host/CMakeLists.txt | 15 --------------- host/docs/CMakeLists.txt | 29 ++++++----------------------- host/docs/mainpage.dox | 27 +++++++++++++++++++++++++++ host/docs/mainpage.dox.in | 27 --------------------------- 4 files changed, 33 insertions(+), 65 deletions(-) create mode 100644 host/docs/mainpage.dox delete mode 100644 host/docs/mainpage.dox.in (limited to 'host') diff --git a/host/CMakeLists.txt b/host/CMakeLists.txt index 55110e12a..95f110e9e 100644 --- a/host/CMakeLists.txt +++ b/host/CMakeLists.txt @@ -374,21 +374,6 @@ LIBUHD_REGISTER_COMPONENT("Examples" ENABLE_EXAMPLES ON "ENABLE_LIBUHD" OFF OFF) LIBUHD_REGISTER_COMPONENT("Utils" ENABLE_UTILS ON "ENABLE_LIBUHD" OFF OFF) LIBUHD_REGISTER_COMPONENT("Tests" ENABLE_TESTS ON "ENABLE_LIBUHD" OFF OFF) -######################################################################## -# Check for fpga-src submodule -######################################################################## -set(HAS_FPGA_SUBMODULE FALSE) -execute_process( - COMMAND ${PYTHON_EXECUTABLE} -c "import os; print(os.path.abspath(os.path.join('${CMAKE_SOURCE_DIR}', '..', 'fpga-src')))" - OUTPUT_VARIABLE FPGA_SUBMODULE_DIR - OUTPUT_STRIP_TRAILING_WHITESPACE -) -if(EXISTS "${FPGA_SUBMODULE_DIR}/docs/fpga.md") - set(HAS_FPGA_SUBMODULE TRUE) - message(STATUS "") - message(STATUS "Found FPGA submodule: ${FPGA_SUBMODULE_DIR}") -endif(EXISTS "${FPGA_SUBMODULE_DIR}/docs/fpga.md") - ######################################################################## # Add the subdirectories ######################################################################## diff --git a/host/docs/CMakeLists.txt b/host/docs/CMakeLists.txt index 08e4a6766..37d67bb16 100644 --- a/host/docs/CMakeLists.txt +++ b/host/docs/CMakeLists.txt @@ -21,35 +21,18 @@ set(ENABLE_MANUAL_OR_DOXYGEN false) ######################################################################## LIBUHD_REGISTER_COMPONENT("Manual" ENABLE_MANUAL ON "DOXYGEN_FOUND" OFF OFF) -# Check if fpga submodule is there. If yes: -# - Add fpga-src/docs and fpga-src/README.md to inputs -# - Add fpga-src docs dirs to strip? -# If no: -# - Make FPGA Manual reference link to our website - if(ENABLE_MANUAL) + set(FPGA_SOURCE_DIR "${CMAKE_SOURCE_DIR}/../fpga") set(ENABLE_MANUAL_OR_DOXYGEN true) - # First: Set up UHD manual only file(GLOB manual_sources "*.dox") + file(GLOB_RECURSE fpga_manual_sources "${FPGA_SOURCE_DIR}/docs/*.md") + list(APPEND manual_sources ${fpga_manual_sources}) set(DOXYGEN_DEPENDENCIES ${manual_sources}) - set(DOXYGEN_INPUT_DIRS "${CMAKE_SOURCE_DIR}/docs ${CMAKE_CURRENT_BINARY_DIR}") + set(DOXYGEN_INPUT_DIRS "${CMAKE_SOURCE_DIR}/docs ${CMAKE_CURRENT_BINARY_DIR} ${FPGA_SOURCE_DIR}/docs") set(DOXYGEN_DEP_COMPONENT "manual") - set(DOXYGEN_FPGA_MANUAL_REFERENCE "Part III: FPGA Manual") - set(DOXYGEN_STRIP_EXTRA "") + set(DOXYGEN_FPGA_MANUAL_REFERENCE "\\subpage md_fpga \"Part III: FPGA Manual\"") + set(DOXYGEN_STRIP_EXTRA "${CMAKE_SOURCE_DIR}/../fpga/docs") set(DOXYGEN_EXCLUDE_DIRS "") - # Now, check if we have the FPGA sources as well. - # If so, pull them in: - if(HAS_FPGA_SUBMODULE) - file(GLOB_RECURSE fpga_manual_sources "${FPGA_SUBMODULE_DIR}/docs/*.md") - list(APPEND manual_sources ${fpga_manual_sources}) - set(DOXYGEN_INPUT_DIRS "${DOXYGEN_INPUT_DIRS} ${FPGA_SUBMODULE_DIR}/docs") - set(DOXYGEN_FPGA_MANUAL_REFERENCE "\\subpage md_fpga \"Part III: FPGA Manual\"") - set(DOXYGEN_STRIP_EXTRA "${FPGA_SUBMODULE_DIR}/docs") - endif(HAS_FPGA_SUBMODULE) - configure_file( - ${CMAKE_CURRENT_SOURCE_DIR}/mainpage.dox.in - ${CMAKE_CURRENT_BINARY_DIR}/mainpage.dox - @ONLY) endif(ENABLE_MANUAL) ######################################################################## diff --git a/host/docs/mainpage.dox b/host/docs/mainpage.dox new file mode 100644 index 000000000..ac2377cde --- /dev/null +++ b/host/docs/mainpage.dox @@ -0,0 +1,27 @@ +/*! \mainpage Table Of Contents + +Welcome to the USRP Hardware Driver (UHD) manual. Here, you will find information on how to use the devices and how to use the API to connect to them through your own software. + +This manual is split into two parts: The device manual, and the UHD/API manual. The first part describes details of our devices, mainboards and daughterboards, as well as aspects of _using_ UHD. + +The second is meant for developers writing UHD-based applications, and includes descriptions of the API, sorted by namespaces, classes and files. + +Follow these links to get to the section of the manual you wish to consult, or use the browser in the left sidebar. A search bar is also available at the top right, but note that this only works on API components. For information on how to build and install UHD, go to the UHD web site (see below). + +## Manual Parts + +\li \subpage page_devices "Part I: Devices & Usage Manual" +\li \subpage page_uhd "Part II: UHD Development Manual" +\li \subpage md_fpga "Part III: FPGA Manual" + +### Further Information + +\li Ettus Research Website + +### Installing and/or Building UHD + +\li \subpage page_install +\li \subpage page_build_guide + +*/ +// vim:ft=doxygen: diff --git a/host/docs/mainpage.dox.in b/host/docs/mainpage.dox.in deleted file mode 100644 index 4b3371a57..000000000 --- a/host/docs/mainpage.dox.in +++ /dev/null @@ -1,27 +0,0 @@ -/*! \mainpage Table Of Contents - -Welcome to the USRP Hardware Driver (UHD) manual. Here, you will find information on how to use the devices and how to use the API to connect to them through your own software. - -This manual is split into two parts: The device manual, and the UHD/API manual. The first part describes details of our devices, mainboards and daughterboards, as well as aspects of _using_ UHD. - -The second is meant for developers writing UHD-based applications, and includes descriptions of the API, sorted by namespaces, classes and files. - -Follow these links to get to the section of the manual you wish to consult, or use the browser in the left sidebar. A search bar is also available at the top right, but note that this only works on API components. For information on how to build and install UHD, go to the UHD web site (see below). - -## Manual Parts - -\li \subpage page_devices "Part I: Devices & Usage Manual" -\li \subpage page_uhd "Part II: UHD Development Manual" -\li @DOXYGEN_FPGA_MANUAL_REFERENCE@ - -### Further Information - -\li Ettus Research Website - -### Installing and/or Building UHD - -\li \subpage page_install -\li \subpage page_build_guide - -*/ -// vim:ft=doxygen: -- cgit v1.2.3