From 925bd26d3a66de434f32ac69599564dc2f5bc69d Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Fri, 24 Apr 2015 18:13:58 -0700 Subject: docs: Added FPGA manual The actual FPGA manual pages are in the FPGA repository. Only if the submodule is checked out will it build the manual pages. If the submodule is not checked out, it will create a link to the FPGA manual hosted online. --- host/CMakeLists.txt | 13 +++++++++++++ host/docs/CMakeLists.txt | 23 ++++++++++++++++++++++- host/docs/Doxyfile.in | 6 +++--- host/docs/mainpage.dox | 28 ---------------------------- host/docs/mainpage.dox.in | 29 +++++++++++++++++++++++++++++ 5 files changed, 67 insertions(+), 32 deletions(-) delete mode 100644 host/docs/mainpage.dox create mode 100644 host/docs/mainpage.dox.in (limited to 'host') diff --git a/host/CMakeLists.txt b/host/CMakeLists.txt index beb4d396f..c235ffe82 100644 --- a/host/CMakeLists.txt +++ b/host/CMakeLists.txt @@ -280,6 +280,19 @@ LIBUHD_REGISTER_COMPONENT("Examples" ENABLE_EXAMPLES ON "ENABLE_LIBUHD" OFF) LIBUHD_REGISTER_COMPONENT("Utils" ENABLE_UTILS ON "ENABLE_LIBUHD" OFF) LIBUHD_REGISTER_COMPONENT("Tests" ENABLE_TESTS ON "ENABLE_LIBUHD" 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 +) +message(STATUS ${FPGA_SUBMODULE_DIR}) +IF(EXISTS "${FPGA_SUBMODULE_DIR}/docs/fpga.md") + SET(HAS_FPGA_SUBMODULE TRUE) +ENDIF(EXISTS "${FPGA_SUBMODULE_DIR}/docs/fpga.md") + ######################################################################## # Add the subdirectories ######################################################################## diff --git a/host/docs/CMakeLists.txt b/host/docs/CMakeLists.txt index 84ed88281..9540ef28e 100644 --- a/host/docs/CMakeLists.txt +++ b/host/docs/CMakeLists.txt @@ -31,12 +31,33 @@ SET(ENABLE_MANUAL_OR_DOXYGEN false) MESSAGE(STATUS "") LIBUHD_REGISTER_COMPONENT("Manual" ENABLE_MANUAL ON "DOXYGEN_FOUND" 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(ENABLE_MANUAL_OR_DOXYGEN true) + # First: Set up UHD manual only FILE(GLOB manual_sources "*.dox") SET(DOXYGEN_DEPENDENCIES ${manual_sources}) - SET(DOXYGEN_INPUT_DIRS ${CMAKE_SOURCE_DIR}/docs) + SET(DOXYGEN_INPUT_DIRS "${CMAKE_SOURCE_DIR}/docs") SET(DOXYGEN_DEP_COMPONENT "manual") + SET(DOXYGEN_FPGA_MANUAL_REFERENCE "Part III: FPGA Manual") + # 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 page_fpga \"Part III: FPGA Manual\"") + ENDIF(HAS_FPGA_SUBMODULE) + message(STATUS ${manual_sources}) + CONFIGURE_FILE( + ${CMAKE_CURRENT_SOURCE_DIR}/mainpage.dox.in + ${CMAKE_CURRENT_BINARY_DIR}/mainpage.dox + @ONLY) ENDIF(ENABLE_MANUAL) ######################################################################## diff --git a/host/docs/Doxyfile.in b/host/docs/Doxyfile.in index b0490c5c0..bca3b71d1 100644 --- a/host/docs/Doxyfile.in +++ b/host/docs/Doxyfile.in @@ -132,7 +132,7 @@ FULL_PATH_NAMES = YES # relative paths, which will be relative from the directory where doxygen is # started. -STRIP_FROM_PATH = @CMAKE_SOURCE_DIR@ +STRIP_FROM_PATH = @CMAKE_SOURCE_DIR@ @FPGA_SUBMODULE_DIR@ # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of # the path mentioned in the documentation of a class, which tells @@ -654,7 +654,7 @@ WARN_LOGFILE = # directories like "/usr/src/myproject". Separate the files or directories # with spaces. -INPUT = @DOXYGEN_INPUT_DIRS@ +INPUT = @CMAKE_CURRENT_BINARY_DIR@/mainpage.dox @DOXYGEN_INPUT_DIRS@ # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is @@ -672,7 +672,7 @@ INPUT_ENCODING = UTF-8 # *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py # *.f90 *.f *.for *.vhd *.vhdl -FILE_PATTERNS = *.hpp *.dox *.h *.ipp +FILE_PATTERNS = *.hpp *.dox *.h *.ipp *.md # The RECURSIVE tag can be used to turn specify whether or not subdirectories # should be searched for input files as well. Possible values are YES and NO. diff --git a/host/docs/mainpage.dox b/host/docs/mainpage.dox deleted file mode 100644 index a12e62c9c..000000000 --- a/host/docs/mainpage.dox +++ /dev/null @@ -1,28 +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" - -### Further Information - -\li Ettus Research LLC Website -\li UHD Wiki Page - -### Building and Installing UHD - -\li \subpage page_build_guide -\li Installation Guide (Linux) -\li Installation Guide (Windows) - -*/ -// vim:ft=doxygen: diff --git a/host/docs/mainpage.dox.in b/host/docs/mainpage.dox.in new file mode 100644 index 000000000..428650633 --- /dev/null +++ b/host/docs/mainpage.dox.in @@ -0,0 +1,29 @@ +/*! \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 LLC Website +\li UHD Wiki Page + +### Building and Installing UHD + +\li \subpage page_build_guide +\li Installation Guide (Linux) +\li Installation Guide (Windows) + +*/ +// vim:ft=doxygen: -- cgit v1.2.3