From 50ee30ab9d85e1cef678887771e75629f4d555e1 Mon Sep 17 00:00:00 2001 From: Mike Gorse Date: Fri, 23 May 2025 11:16:44 -0500 Subject: [PATCH] Generate output directories before building manpages Otherwise, there is a race when the two manpages are generated, and the build might intermittently fail with errors like this: error: Could not create output directory /home/abuild/rpmbuild/BUILD/editorconfig-core-c-0.12.9-build/editorconfig-core-c-0.12.9/build/doc/man make[2]: *** [doc/CMakeFiles/doc.dir/build.make:91: doc/man/man5/editorconfig-format.5] Error 1 --- doc/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index a7dc128..3e3af46 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -71,6 +71,8 @@ if(BUILD_DOCUMENTATION) add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/man/man1/editorconfig.1 COMMAND + ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/man + COMMAND ${DOXYGEN_EXECUTABLE} "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile-1" MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in @@ -88,6 +90,8 @@ if(BUILD_DOCUMENTATION) add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/man/man5/editorconfig-format.5 COMMAND + ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/man + COMMAND ${DOXYGEN_EXECUTABLE} "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile-5" MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in -- 2.49.0