krytarowski created this revision.
krytarowski added a reviewer: beanz.
krytarowski added subscribers: joerg, cfe-commits.
krytarowski set the repository for this revision to rL LLVM.
Caught on NetBSD.

Repository:
  rL LLVM

http://reviews.llvm.org/D14800

Files:
  INSTALL.txt
  tools/scan-build/CMakeLists.txt

Index: tools/scan-build/CMakeLists.txt
===================================================================
--- tools/scan-build/CMakeLists.txt
+++ tools/scan-build/CMakeLists.txt
@@ -1,5 +1,7 @@
 option(CLANG_INSTALL_SCANBUILD "Install the scan-build tool" ON)
 
+include(GNUInstallDirs)
+
 if (WIN32 AND NOT CYGWIN)
   set(BinFiles
         scan-build.bat)
@@ -52,15 +54,15 @@
   endforeach()
 
   foreach(ManPage ${ManPages})
-    add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/share/man/man1/${ManPage}
+    add_custom_command(OUTPUT 
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_MANDIR}/man1/${ManPage}
                        COMMAND ${CMAKE_COMMAND} -E make_directory
-                         ${CMAKE_BINARY_DIR}/share/man/man1
+                         ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_MANDIR}/man1
                        COMMAND ${CMAKE_COMMAND} -E copy
                          ${CMAKE_CURRENT_SOURCE_DIR}/man/${ManPage}
-                         ${CMAKE_BINARY_DIR}/share/man/man1/
+                         ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_MANDIR}/man1/
                        DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/man/${ManPage})
-    list(APPEND Depends ${CMAKE_BINARY_DIR}/share/man/man1/${ManPage})
-    install(PROGRAMS man/${ManPage} DESTINATION share/man/man1)
+    list(APPEND Depends 
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_MANDIR}/man1/${ManPage})
+    install(PROGRAMS man/${ManPage} DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
   endforeach()
 
   foreach(ShareFile ${ShareFiles})
@@ -78,4 +80,3 @@
   add_custom_target(scan-build ALL DEPENDS ${Depends})
   set_target_properties(scan-build PROPERTIES FOLDER "Misc")
 endif()
-
Index: INSTALL.txt
===================================================================
--- INSTALL.txt
+++ INSTALL.txt
@@ -45,5 +45,4 @@
 configured.
 
 The Clang compiler is available as 'clang' and 'clang++'. It supports a gcc 
like
-command line interface. See the man page for clang (installed into
-$prefix/share/man/man1) for more information.
+command line interface. See the man page for clang for more information.


Index: tools/scan-build/CMakeLists.txt
===================================================================
--- tools/scan-build/CMakeLists.txt
+++ tools/scan-build/CMakeLists.txt
@@ -1,5 +1,7 @@
 option(CLANG_INSTALL_SCANBUILD "Install the scan-build tool" ON)
 
+include(GNUInstallDirs)
+
 if (WIN32 AND NOT CYGWIN)
   set(BinFiles
         scan-build.bat)
@@ -52,15 +54,15 @@
   endforeach()
 
   foreach(ManPage ${ManPages})
-    add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/share/man/man1/${ManPage}
+    add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_MANDIR}/man1/${ManPage}
                        COMMAND ${CMAKE_COMMAND} -E make_directory
-                         ${CMAKE_BINARY_DIR}/share/man/man1
+                         ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_MANDIR}/man1
                        COMMAND ${CMAKE_COMMAND} -E copy
                          ${CMAKE_CURRENT_SOURCE_DIR}/man/${ManPage}
-                         ${CMAKE_BINARY_DIR}/share/man/man1/
+                         ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_MANDIR}/man1/
                        DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/man/${ManPage})
-    list(APPEND Depends ${CMAKE_BINARY_DIR}/share/man/man1/${ManPage})
-    install(PROGRAMS man/${ManPage} DESTINATION share/man/man1)
+    list(APPEND Depends ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_MANDIR}/man1/${ManPage})
+    install(PROGRAMS man/${ManPage} DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
   endforeach()
 
   foreach(ShareFile ${ShareFiles})
@@ -78,4 +80,3 @@
   add_custom_target(scan-build ALL DEPENDS ${Depends})
   set_target_properties(scan-build PROPERTIES FOLDER "Misc")
 endif()
-
Index: INSTALL.txt
===================================================================
--- INSTALL.txt
+++ INSTALL.txt
@@ -45,5 +45,4 @@
 configured.
 
 The Clang compiler is available as 'clang' and 'clang++'. It supports a gcc like
-command line interface. See the man page for clang (installed into
-$prefix/share/man/man1) for more information.
+command line interface. See the man page for clang for more information.
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to