From e1ebe476e45a677535f8cae3cc9f7fb84f477fdd Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Tue, 6 Sep 2022 09:50:47 -0400 Subject: [PATCH] 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. --- clang/docs/CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/clang/docs/CMakeLists.txt b/clang/docs/CMakeLists.txt index 2d3ac5d..5329073 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_different + "${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 -- 2.7.4