[clang] e1ebe47 - Fix Clang Sphinx docs build
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 6 06:52:35 PDT 2022
Author: Aaron Ballman
Date: 2022-09-06T09:52:22-04:00
New Revision: e1ebe476e45a677535f8cae3cc9f7fb84f477fdd
URL: https://github.com/llvm/llvm-project/commit/e1ebe476e45a677535f8cae3cc9f7fb84f477fdd
DIFF: https://github.com/llvm/llvm-project/commit/e1ebe476e45a677535f8cae3cc9f7fb84f477fdd.diff
LOG: Fix Clang Sphinx docs build
The CodeOwners.rst file needs to live in the same directory as the rest
of the documentation. This copies the file to the correct place when
making a Sphinx build but continues to leave the .rst file at the root
directory where it's easier for developers to find. This also ensures
that local doc builds using `make html` work as expected.
Added:
Modified:
clang/docs/CMakeLists.txt
Removed:
################################################################################
diff --git a/clang/docs/CMakeLists.txt b/clang/docs/CMakeLists.txt
index 2d3ac5dbdd19..532907385df4 100644
--- a/clang/docs/CMakeLists.txt
+++ b/clang/docs/CMakeLists.txt
@@ -114,8 +114,12 @@ if (LLVM_ENABLE_SPHINX)
# directory before we run sphinx.
add_custom_target(copy-clang-rst-docs
COMMAND "${CMAKE_COMMAND}" -E copy_directory
- "${CMAKE_CURRENT_SOURCE_DIR}"
- "${CMAKE_CURRENT_BINARY_DIR}")
+ "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_BINARY_DIR}"
+
+ COMMAND "${CMAKE_COMMAND}" -E copy_if_
diff erent
+ "${CMAKE_CURRENT_SOURCE_DIR}/../CodeOwners.rst"
+ "${CMAKE_CURRENT_BINARY_DIR}"
+ )
add_dependencies(docs-clang-html copy-clang-rst-docs)
add_custom_command(TARGET docs-clang-html POST_BUILD
More information about the cfe-commits
mailing list