diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index db27d9b..828e43b 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -153,5 +153,9 @@ add_custom_target(clean_doxygen_garbage # Set up the target add_custom_target(doc_doxygen true DEPENDS ${DOXYGEN_MANPAGES}) -# Add the target to the "doc" meta-target -add_dependencies(doc doc_doxygen clean_doxygen_garbage) +# Add the target to the "doc" meta-target. The fact that "doc" depends +# only on "clean_doxygen_garbage" and that the latter depends on +# "doc_doxygen" guaranties that the garbage are actually cleaned *after* +# they are generated. +add_dependencies(clean_doxygen_garbage doc_doxygen) +add_dependencies(doc clean_doxygen_garbage)