Skip to content

Commit e1ebe47

Browse files
committed
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.
1 parent 0431eb5 commit e1ebe47

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

clang/docs/CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,12 @@ if (LLVM_ENABLE_SPHINX)
114114
# directory before we run sphinx.
115115
add_custom_target(copy-clang-rst-docs
116116
COMMAND "${CMAKE_COMMAND}" -E copy_directory
117-
"${CMAKE_CURRENT_SOURCE_DIR}"
118-
"${CMAKE_CURRENT_BINARY_DIR}")
117+
"${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_BINARY_DIR}"
118+
119+
COMMAND "${CMAKE_COMMAND}" -E copy_if_different
120+
"${CMAKE_CURRENT_SOURCE_DIR}/../CodeOwners.rst"
121+
"${CMAKE_CURRENT_BINARY_DIR}"
122+
)
119123
add_dependencies(docs-clang-html copy-clang-rst-docs)
120124

121125
add_custom_command(TARGET docs-clang-html POST_BUILD

0 commit comments

Comments
 (0)