clean up generate doc dirs with ninja clean

develop
myk002 2022-08-05 22:05:52 -07:00
parent f7acc5cfc6
commit b3a2a10caa
No known key found for this signature in database
GPG Key ID: 8A39CA0FA0C16E78
4 changed files with 13 additions and 3 deletions

1
.gitignore vendored

@ -19,6 +19,7 @@ docs/changelogs/
docs/html/
docs/pdf/
docs/pseudoxml/
docs/tags/
docs/text/
docs/tools/
docs/xml/

@ -473,7 +473,16 @@ if(BUILD_DOCS)
)
set(SPHINX_OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/docs/html/.buildinfo")
set_source_files_properties(${SPHINX_OUTPUT} PROPERTIES GENERATED TRUE)
set_property(
DIRECTORY PROPERTY ADDITIONAL_CLEAN_FILES TRUE
"${CMAKE_CURRENT_SOURCE_DIR}/docs/changelogs"
"${CMAKE_CURRENT_SOURCE_DIR}/docs/html"
"${CMAKE_CURRENT_SOURCE_DIR}/docs/tags"
"${CMAKE_CURRENT_SOURCE_DIR}/docs/text"
"${CMAKE_CURRENT_SOURCE_DIR}/docs/tools"
"${CMAKE_BINARY_DIR}/docs/html"
"${CMAKE_BINARY_DIR}/docs/text"
)
add_custom_command(OUTPUT ${SPHINX_OUTPUT}
COMMAND ${SPHINX_EXECUTABLE}
-E -q -b html -d "${CMAKE_BINARY_DIR}/docs/html"

@ -1,2 +0,0 @@
*.txt
*.rst

@ -238,6 +238,8 @@ def generate_changelog(all=False):
consolidate_changelog(stable_entries)
consolidate_changelog(dev_entries)
os.makedirs(os.path.join(DOCS_ROOT, 'changelogs'), mode=0o755, exist_ok=True)
print_changelog(versions, stable_entries, os.path.join(DOCS_ROOT, 'changelogs/news.rst'))
print_changelog(versions, dev_entries, os.path.join(DOCS_ROOT, 'changelogs/news-dev.rst'))