<commit_before># -*- coding: utf-8 -*-
# ----------------------------------------------------------------------
# Copyright © 2011-2013, RedJack, LLC.
# All rights reserved.
#
# Please see the LICENSE.txt file in this distribution for license
# details.
# ----------------------------------------------------------------------

# Fill this in with any man pages that should be built from a pandoc source
# file.  For a man page called foo.5, there should be a pandoc source file
# called foo.5.pandoc.

set(MAN_PAGES
)

#-----------------------------------------------------------------------
# Everything below is boilerplate!

find_program(
    PANDOC_EXECUTABLE
    NAMES pandoc
    HINTS ENV PANDOC_DIR
    PATH_SUFFIXES bin
    DOC "Pandoc man page generator"
)

set(GENERATE_DOC TRUE CACHE BOOL
    "Whether to rebuild documentation")

if (NOT PANDOC_EXECUTABLE)
    message(WARNING "Unable to find pandoc documentation generator")
    set(GENERATE_DOC FALSE)
endif (NOT PANDOC_EXECUTABLE)


# Link man pages go in docs/links

macro(install_links section)
    install(
        DIRECTORY links/
        DESTINATION "share/man/man${section}"
        FILES_MATCHING PATTERN "*.${section}"
    )
endmacro(install_links section)

install_links(1)   # commands
install_links(3)   # library API
install_links(4)   # special files and drivers
install_links(5)   # file formats and conventions
install_links(7)   # miscellaneous
install_links(8)   # system commands


# Man pages with actual content go in docs

set(ALL_MANS)

macro(pandocify name)
    set(src  "${CMAKE_CURRENT_SOURCE_DIR}/${name}.pandoc")
    set(dest "${CMAKE_CURRENT_SOURCE_DIR}/${name}")
    get_filename_component(section "${name}" EXT)
    string(REPLACE "." "" section "${section}")<commit_msg>Don't install empty man page directories<commit_after># -*- coding: utf-8 -*-
# ----------------------------------------------------------------------
# Copyright © 2011-2013, RedJack, LLC.
# All rights reserved.
#
# Please see the LICENSE.txt file in this distribution for license
# details.
# ----------------------------------------------------------------------

# Fill this in with any man pages that should be built from a pandoc source
# file.  For a man page called foo.5, there should be a pandoc source file
# called foo.5.pandoc.

set(MAN_PAGES
)

#-----------------------------------------------------------------------
# Everything below is boilerplate!

find_program(
    PANDOC_EXECUTABLE
    NAMES pandoc
    HINTS ENV PANDOC_DIR
    PATH_SUFFIXES bin
    DOC "Pandoc man page generator"
)

set(GENERATE_DOC TRUE CACHE BOOL
    "Whether to rebuild documentation")

if (NOT PANDOC_EXECUTABLE)
    message(WARNING "Unable to find pandoc documentation generator")
    set(GENERATE_DOC FALSE)
endif (NOT PANDOC_EXECUTABLE)


# Link man pages go in docs/links

macro(install_links section)
    file(GLOB links "links/*.${section}")
    if (links)
        install(
            FILES ${links}
            DESTINATION "share/man/man${section}"
        )
    endif (links)
endmacro(install_links section)

install_links(1)   # commands
install_links(3)   # library API
install_links(4)   # special files and drivers
install_links(5)   # file formats and conventions
install_links(7)   # miscellaneous
install_links(8)   # system commands


# Man pages with actual content go in docs

set(ALL_MANS)

macro(pandocify name)
    set(src  "${CMAKE_CURRENT_SOURCE_DIR}/${name}.pandoc")
    set(dest "${CMAKE_CURRENT_SOURCE_DIR}/${name}")
    get_filename_component(section "${name}" EXT)
    string(REPLACE "." "" section "${section}")
{'fraction_non_alphanumeric': 0.20155469183786784, 'fraction_numerical': 0.009439200444197668, 'mean_word_length': 2.3361111111111112, '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': '5788840', 'n_tokens_mistral': 1092, 'n_tokens_neox': 1021, 'n_words': 316}