diff options
author | Martin Braun <martin.braun@ettus.com> | 2015-04-24 18:13:58 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2015-04-27 15:34:55 -0700 |
commit | 925bd26d3a66de434f32ac69599564dc2f5bc69d (patch) | |
tree | 602b4d9a2f632ca3f9cc5b81ea05bb05282c1fe9 /host | |
parent | d74af0b4d17d66f9bb94638a06a25195f6dc885a (diff) | |
download | uhd-925bd26d3a66de434f32ac69599564dc2f5bc69d.tar.gz uhd-925bd26d3a66de434f32ac69599564dc2f5bc69d.tar.bz2 uhd-925bd26d3a66de434f32ac69599564dc2f5bc69d.zip |
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.
Diffstat (limited to 'host')
-rw-r--r-- | host/CMakeLists.txt | 13 | ||||
-rw-r--r-- | host/docs/CMakeLists.txt | 23 | ||||
-rw-r--r-- | host/docs/Doxyfile.in | 6 | ||||
-rw-r--r-- | host/docs/mainpage.dox.in (renamed from host/docs/mainpage.dox) | 1 |
4 files changed, 39 insertions, 4 deletions
diff --git a/host/CMakeLists.txt b/host/CMakeLists.txt index beb4d396f..c235ffe82 100644 --- a/host/CMakeLists.txt +++ b/host/CMakeLists.txt @@ -281,6 +281,19 @@ 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 ######################################################################## ADD_SUBDIRECTORY(docs) 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 "<a href=\"http://files.ettus.com/manual/page_fpga.html\">Part III: FPGA Manual</a>") + # 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.in index a12e62c9c..428650633 100644 --- a/host/docs/mainpage.dox +++ b/host/docs/mainpage.dox.in @@ -12,6 +12,7 @@ Follow these links to get to the section of the manual you wish to consult, or u \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 |