Fix installation rules for man pages: don't install gromacs.7.cmakein
authorRoland Schulz <roland@utk.edu>
Tue, 24 Jul 2012 11:44:07 +0000 (07:44 -0400)
committerRoland Schulz <roland@utk.edu>
Tue, 24 Jul 2012 23:53:47 +0000 (19:53 -0400)
8c87e60 added gromacs.7.cmakein and didn't add an exclusion rule.

Change to CPackInit.cmake: Removing wrong (incorrect path) and unnessary file in message.

Change-Id: I8fe7436b8164d80ad6db64eb54dc81424cd44e4a

CMakeLists.txt
CPackInit.cmake
cmake/BuildManPages.cmake
man/CMakeLists.txt [deleted file]

index 8facc2d7c465ea96a71982861b0ceda727c2023c..0eef9de6fd7d448813dcd4914845bd5b2562ec1b 100644 (file)
@@ -1019,7 +1019,6 @@ endif()
 
 add_subdirectory(share)
 add_subdirectory(include)
-add_subdirectory(man)
 add_subdirectory(src)
 add_subdirectory(scripts)
 
index d0f255a8bd6f879fc307b8b1f3f3a384cad78359..20d2c2369510a415d03d9a2bf2327d70c5fcc946 100644 (file)
@@ -4,5 +4,5 @@ if(CPACK_SOURCE_PACKAGE_FILE_NAME AND NOT EXISTS "${CMAKE_BINARY_DIR}/man/man1/n
     message(FATAL_ERROR 
         "To generate correct source package all man pages need to be generated. "
         "The man pages are automatically build together with the binaries. "
-        "Make sure to build all binaries (e.g. GMX_X11=on). ${CMAKE_SOURCE_DIR}/man/man1/ngmx.1")
+        "Make sure to build all binaries (e.g. GMX_X11=on).")
 endif()
index bd3f5937b46e92ee5e057f01bd5602e7604ed72f..65ac6540755dd81a702b9e3130f8ea3696dfa5af 100644 (file)
@@ -35,6 +35,10 @@ if(GMX_BUILD_MANPAGES)
     configure_file(${CMAKE_SOURCE_DIR}/man/man7/gromacs.7.cmakein ${CMAKE_BINARY_DIR}/man/man7/gromacs.7)
     install(FILES ${CMAKE_BINARY_DIR}/man/man7/gromacs.7 DESTINATION
         ${MAN_INSTALL_DIR}/man7)
+#man-pages are only avalaible if they are either build or this is a source archive
+elseif(NOT EXISTS "${CMAKE_SOURCE_DIR}/admin/.isreposource")
+    install(FILES ${CMAKE_SOURCE_DIR}/man/man7/gromacs.7 DESTINATION
+        ${MAN_INSTALL_DIR}/man7)
 endif()
 
 function (gmx_add_man_page EXENAME)
@@ -56,5 +60,8 @@ function (gmx_add_man_page EXENAME)
                 -P ${CMAKE_SOURCE_DIR}/cmake/Filter.cmake)
         install(FILES ${MAN1_PATH}/${EXENAME}.1 DESTINATION 
             ${MAN_INSTALL_DIR}/man1)
+    elseif(NOT EXISTS "${CMAKE_SOURCE_DIR}/admin/.isreposource")
+        install(FILES ${CMAKE_SOURCE_DIR}/man/man1/${EXENAME}.1 DESTINATION 
+            ${MAN_INSTALL_DIR}/man1)
     endif()
 endfunction ()
diff --git a/man/CMakeLists.txt b/man/CMakeLists.txt
deleted file mode 100644 (file)
index 82953fe..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-# Man pages: Nothing to build, just installation
-install(DIRECTORY . DESTINATION ${MAN_INSTALL_DIR}
-  COMPONENT data
-  PATTERN "Makefile*" EXCLUDE
-  PATTERN "CMake*" EXCLUDE
-  PATTERN "cmake*" EXCLUDE
-  PATTERN "*~" EXCLUDE
-)