[mlpack-svn] r11338 - mlpack/trunk

fastlab-svn at coffeetalk-1.cc.gatech.edu fastlab-svn at coffeetalk-1.cc.gatech.edu
Wed Feb 1 17:14:46 EST 2012


Author: rcurtin
Date: 2012-02-01 17:14:45 -0500 (Wed, 01 Feb 2012)
New Revision: 11338

Modified:
   mlpack/trunk/CMakeLists.txt
Log:
Make rules to generate man page documentation.  This is goodliness.


Modified: mlpack/trunk/CMakeLists.txt
===================================================================
--- mlpack/trunk/CMakeLists.txt	2012-02-01 22:13:42 UTC (rev 11337)
+++ mlpack/trunk/CMakeLists.txt	2012-02-01 22:14:45 UTC (rev 11338)
@@ -132,3 +132,31 @@
     OPTIONAL
   )
 endif (DOXYGEN_FOUND)
+
+# Make a target to generate the man page documentation, but only if we are on a
+# UNIX-like system.
+if (UNIX)
+  find_program(TXT2MAN txt2man)
+
+  # It's not a requirement that we make man pages.
+  if (NOT TXT2MAN)
+    message(WARNING "txt2man not found; man pages will not be generated.")
+  else (NOT TXT2MAN)
+    # We have the tools.  We can make them.
+    add_custom_target(man ALL
+      ${CMAKE_CURRENT_SOURCE_DIR}/CMake/allexec2man.sh
+          ${CMAKE_CURRENT_SOURCE_DIR}/CMake/exec2man.sh
+          ${CMAKE_BINARY_DIR}/share/man
+      WORKING_DIRECTORY
+          ${CMAKE_BINARY_DIR}/bin
+      DEPENDS
+          allkfn allknn emst gmm hmm_generate hmm_loglik hmm_train hmm_viterbi
+          kernel_pca kmeans lars linear_regression mvu nbc nca pca radical
+      COMMENT "Generating man pages from built executables."
+    )
+
+    # Set the rules to install the documentation.
+    install(DIRECTORY ${CMAKE_BINARY_DIR}/share/man/
+        DESTINATION share/man/man1/)
+  endif (NOT TXT2MAN)
+endif (UNIX)




More information about the mlpack-svn mailing list