<commit_before>
find_program(sphinxbuild NAMES sphinx-build sphinx-build-3)

if (sphinxbuild)
  add_custom_target(
    doc
    COMMAND ${CMAKE_COMMAND} -E rm -rRf ${CMAKE_CURRENT_BINARY_DIR}/_build
    COMMAND ${sphinxbuild} -a -E -b html
      -d ${CMAKE_CURRENT_BINARY_DIR}/_build/doctrees 
      ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/_build/html
      -D "version=${PROJECT_VERSION}" -D "release=${PROJECT_VERSION}"
    COMMAND tar "cf" "${CMAKE_BINARY_DIR}/frepple-doc-${PROJECT_VERSION}.tgz" -C ${CMAKE_CURRENT_BINARY_DIR}/_build -- html
    )
else()
  message("No documentation can be built - missing sphinx-build")
endif()

if (NOT WIN32)
  INSTALL(
    FILES frepple.1 frepplectl.1<commit_msg>doc: keep compatible with older cmake versions<commit_after>
find_program(sphinxbuild NAMES sphinx-build sphinx-build-3)

if (sphinxbuild)
  add_custom_target(
    doc
    COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_CURRENT_BINARY_DIR}/_build
    COMMAND ${sphinxbuild} -a -E -b html
      -d ${CMAKE_CURRENT_BINARY_DIR}/_build/doctrees 
      ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/_build/html
      -D "version=${PROJECT_VERSION}" -D "release=${PROJECT_VERSION}"
    COMMAND tar "cf" "${CMAKE_BINARY_DIR}/frepple-doc-${PROJECT_VERSION}.tgz" -C ${CMAKE_CURRENT_BINARY_DIR}/_build -- html
    )
else()
  message("No documentation can be built - missing sphinx-build")
endif()

if (NOT WIN32)
  INSTALL(
    FILES frepple.1 frepplectl.1
{'fraction_non_alphanumeric': 0.12297297297297298, 'fraction_numerical': 0.006756756756756757, 'mean_word_length': 4.464944649446495, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4357163', 'n_tokens_mistral': 579, 'n_tokens_neox': 540, 'n_words': 108}