Provide ${PROJECT}_INSTALL_SPHINX_HTML_DIR variables (e.g. LLVM_INSTALL_SPHINX_HTML_DIR) to override Sphinx HTML doc install directory.
Details
Diff Detail
Event Timeline
I agree with what you're trying achieve but I have a few nits. Once we've fixed those you also need to document the option in doc/CMake.rst (under LLVM-specific variables). You probably only need to document for LLVM (i.e. LLVM_INSTALL_SPHINX_HTML_DIR or whatever we decide to name it) and not the other sub-projects.
If you can get all that done and @rnk has no objections we can probably merge.
cmake/modules/AddSphinxTarget.cmake | ||
---|---|---|
57 | This is not a good name for the variable because we also generate HTML doxygen documentation and thus this variable name is ambiguous (see https://github.com/llvm-mirror/llvm/blob/2c37c7740e3ea7a68447b4890e062abca9b69c0f/docs/CMakeLists.txt#L97 ). How about ${project_upper}_INSTALL_SPHINX_HTML_DIR ? | |
60 | Why did you change "${SPHINX_BUILD_DIR}" to "${SPHINX_BUILD_DIR}/." ? |
Thanks for the review. I've replied to your comments, and will update the patch in a few hours.
cmake/modules/AddSphinxTarget.cmake | ||
---|---|---|
57 | You're right, I'll use that. I'm planning to also add variables for the other kinds of documentation in a separate patch (since they end up in /usr/docs...). | |
60 | This is necessary to avoid implicitly creating additional 'html' subdirectory, i.e. otherwise it would be installed as ${...}/html. |
cmake/modules/AddSphinxTarget.cmake | ||
---|---|---|
60 | I see. There should be a comment explaining this then. | |
docs/CMake.rst | ||
461 | This default is incorrect. The default is actually share/doc/llvm/html. It does not contain the CMAKE_INSTALL_PREFIX. Your text probably ought to say something like: The path to install Sphinx-generated HTML documentation to. This path relative to the CMAKE_INSTALL_PREFIX and by default is `share/doc/llvm/html`. |
docs/CMake.rst | ||
---|---|---|
461 | Well, this is not 100% correct since it is relative only when it's not absolute ;-). I'll try to find a good way to express it. |
This is not a good name for the variable because we also generate HTML doxygen documentation and thus this variable name is ambiguous (see https://github.com/llvm-mirror/llvm/blob/2c37c7740e3ea7a68447b4890e062abca9b69c0f/docs/CMakeLists.txt#L97 ). How about
${project_upper}_INSTALL_SPHINX_HTML_DIR
?