]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
cmake: fix for ninja phony cycle related configuring errors
authorRalf Habacker <ralf.habacker@freenet.de>
Thu, 17 Feb 2022 13:04:55 +0000 (14:04 +0100)
committerRalf Habacker <ralf.habacker@freenet.de>
Thu, 17 Feb 2022 13:12:09 +0000 (14:12 +0100)
A prefix has been added to the custom target names in docbook-related
macros to fix the reported error:

  ninja: error: build.ninja:xxx: multiple rules generate
  doc/dbus-xxx.1.html [-w dupbuild=err]

Fixes #377

Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
doc/CMakeLists.txt

index 1e3d9a629fbd80f5f634da9ccf66fa84c1b23d79..6494aab3c5900bb57231124cf226e19f04a4fc29 100644 (file)
@@ -115,7 +115,7 @@ configure_file(${srcfile} ${_outfile})
         DEPENDS ${srcfile} ${CMAKE_BINARY_DIR}/CMakeCache.txt
         COMMENT "Generating ${outname}"
     )
-    add_custom_target(${outname} DEPENDS ${_outfile})
+    add_custom_target(xmldoc-${outname} DEPENDS ${_outfile})
 endmacro()
 
 #
@@ -149,8 +149,8 @@ macro(DOCBOOK _source)
             DEPENDS ${XSLTPROC_EXECUTABLE} ${_infile}
             WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
         )
-        add_custom_target(${_outname} DEPENDS ${_outfile})
-        add_dependencies(xmldoc ${_outname})
+        add_custom_target(xmldoc-${_outname} DEPENDS ${_outfile})
+        add_dependencies(xmldoc xmldoc-${_outname})
         install(FILES ${_outfile} DESTINATION ${INSTALL_DIR})
     endforeach()
 endmacro()