summaryrefslogtreecommitdiffstats
path: root/llvm/cmake/modules/AddSphinxTarget.cmake
diff options
context:
space:
mode:
authorJonathan Roelofs <jonathan@codesourcery.com>2017-04-05 14:49:46 +0000
committerJonathan Roelofs <jonathan@codesourcery.com>2017-04-05 14:49:46 +0000
commitff9a2f9175d19e02e4ee33d210f752749dc84a00 (patch)
treea9d042f0e43318f4a51daf4e2dee36bd7027b7c5 /llvm/cmake/modules/AddSphinxTarget.cmake
parent91f00258be3c21fdc298a717364647fcbde65c7f (diff)
downloadbcm5719-llvm-ff9a2f9175d19e02e4ee33d210f752749dc84a00.tar.gz
bcm5719-llvm-ff9a2f9175d19e02e4ee33d210f752749dc84a00.zip
Respect CMAKE_INSTALL_MANDIR for sphinx generated manpages
This is a re-work of r297516, which was reverted in r297545. https://reviews.llvm.org/D30906 llvm-svn: 299547
Diffstat (limited to 'llvm/cmake/modules/AddSphinxTarget.cmake')
-rw-r--r--llvm/cmake/modules/AddSphinxTarget.cmake7
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/cmake/modules/AddSphinxTarget.cmake b/llvm/cmake/modules/AddSphinxTarget.cmake
index 3456b536e80..cfc7f38e9e7 100644
--- a/llvm/cmake/modules/AddSphinxTarget.cmake
+++ b/llvm/cmake/modules/AddSphinxTarget.cmake
@@ -48,10 +48,15 @@ function (add_sphinx_target builder project)
# Handle installation
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
if (builder STREQUAL man)
+ if (CMAKE_INSTALL_MANDIR)
+ set(INSTALL_MANDIR ${CMAKE_INSTALL_MANDIR}/)
+ else()
+ set(INSTALL_MANDIR share/man/)
+ endif()
# FIXME: We might not ship all the tools that these man pages describe
install(DIRECTORY "${SPHINX_BUILD_DIR}/" # Slash indicates contents of
COMPONENT "${project}-sphinx-man"
- DESTINATION share/man/man1)
+ DESTINATION ${INSTALL_MANDIR}man1)
elseif (builder STREQUAL html)
string(TOUPPER "${project}" project_upper)
OpenPOWER on IntegriCloud