aboutsummaryrefslogtreecommitdiffstats
path: root/host/docs/CMakeLists.txt
diff options
context:
space:
mode:
authorNicholas Corgan <nick.corgan@ettus.com>2013-05-03 10:54:36 -0700
committerNicholas Corgan <nick.corgan@ettus.com>2013-05-03 10:59:37 -0700
commitb0a4e2ad081cc55ad309d44b59583f0140f87608 (patch)
tree4546a2036f7261c65d2477a2e12112a4b3bec8da /host/docs/CMakeLists.txt
parent3cccb57414c87d3af97974870d877393ab5a51ff (diff)
downloaduhd-b0a4e2ad081cc55ad309d44b59583f0140f87608.tar.gz
uhd-b0a4e2ad081cc55ad309d44b59583f0140f87608.tar.bz2
uhd-b0a4e2ad081cc55ad309d44b59583f0140f87608.zip
UHD has man pages now
* Linux installations will automatically install man pages * Moved usrp_n2xx_simple_net_burner and usrp2_card_burner into bin
Diffstat (limited to 'host/docs/CMakeLists.txt')
-rw-r--r--host/docs/CMakeLists.txt46
1 files changed, 46 insertions, 0 deletions
diff --git a/host/docs/CMakeLists.txt b/host/docs/CMakeLists.txt
index f56358ca9..3c49f8088 100644
--- a/host/docs/CMakeLists.txt
+++ b/host/docs/CMakeLists.txt
@@ -106,3 +106,49 @@ IF(ENABLE_DOXYGEN)
ADD_CUSTOM_TARGET(doxygen_docs ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR_DOXYGEN})
INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR_DOXYGEN} DESTINATION ${PKG_DOC_DIR} COMPONENT doxygen)
ENDIF(ENABLE_DOXYGEN)
+
+########################################################################
+# List of man page sources
+########################################################################
+
+SET(man_page_sources
+ uhd_cal_rx_iq_balance.1
+ uhd_cal_tx_dc_offset.1
+ uhd_cal_tx_iq_balance.1
+ uhd_find_devices.1
+ uhd_images_downloader.1
+ uhd_usrp_probe.1
+ usrp_n2xx_simple_net_burner.1
+ usrp2_card_burner.1
+)
+
+########################################################################
+# Setup man pages
+########################################################################
+MESSAGE(STATUS "")
+FIND_PACKAGE(GZip)
+
+LIBUHD_REGISTER_COMPONENT("Man Pages" ENABLE_MAN_PAGES ON "GZIP_FOUND;LINUX" OFF)
+
+IF(ENABLE_MAN_PAGES)
+ #Generate man pages
+ FOREACH(manfile ${man_page_sources})
+ #make the gzip file depend on the text file
+ STRING(REPLACE ".1" "" PROGRAM_NAME "${manfile}")
+ SET(gzfile "${CMAKE_CURRENT_BINARY_DIR}/${manfile}.gz")
+ SET(manfile "${CMAKE_CURRENT_SOURCE_DIR}/${manfile}")
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${gzfile}
+ DEPENDS ${manfile}
+ COMMAND ${GZIP_EXECUTABLE} -cf ${manfile} > ${gzfile}
+ COMMENT "Generating ${PROGRAM_NAME} man page"
+ )
+
+ #make the man page target depend on the gz file
+ LIST(APPEND man_page_gz_files ${gzfile})
+ INSTALL(FILES ${gzfile} DESTINATION ${PKG_MAN_DIR} COMPONENT manpages)
+ ENDFOREACH(manfile ${man_page_sources})
+
+ #make the man pages a build-time dependency
+ ADD_CUSTOM_TARGET(man_page_gzips ALL DEPENDS ${man_page_gz_files})
+ENDIF(ENABLE_MAN_PAGES)