<commit_before># GtkDoc.cmake
#
# Macros for building Midori API documentation.
# Copyright (C) 2013 <NAME>

find_program (GTKDOC_SCAN_BIN gtkdoc-scan)
find_program (GTKDOC_MKDB_BIN gtkdoc-mkdb)
find_program (GTKDOC_MKHTML_BIN gtkdoc-mkhtml)
find_program (GTKDOC_MKTMPL_BIN gtkdoc-mktmpl)

if (GTKDOC_SCAN_BIN AND GTKDOC_MKTMPL_BIN AND GTKDOC_MKDB_BIN
        AND GTKDOC_MKHTML_BIN)

    set (GTKDOC_FOUND TRUE)

    macro (gtkdoc_build module)
        add_custom_target ("gtkdoc-scan_${module}" ALL
            ${GTKDOC_SCAN_BIN} --module=${module}
                --source-dir="../../${module}"
                --output-dir="${module}"
                --rebuild-sections --rebuild-types
            WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")

        add_custom_target ("gtkdoc-tmpl_${module}" ALL
            ${GTKDOC_MKTMPL_BIN} --module=${module}
            WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${module}")

        add_custom_target ("gtkdoc-docbook_${module}" ALL
            ${GTKDOC_MKDB_BIN} --module=${module}
                --source-dir="."
                --output-dir="xml"
                --source-suffixes=c,h --output-format=xml
                --default-includes=${module}/${module}.h
                --sgml-mode --main-sgml-file=${module}.sgml
            WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${module}")

        add_dependencies ("gtkdoc-docbook_${module}"
            "gtkdoc-tmpl_${module}"
            "gtkdoc-scan_${module}")

        # Keep this target alone, otherwise build fails
        add_custom_target ("gtkdoc-html_${module}" ALL
            ${GTKDOC_MKHTML_BIN} ${module}
                "../${module}.sgml"
            WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${module}/html")

        add_dependencies ("gtkdoc-html_${module}"
            "gtkdoc-docbook_${module}")
    endmacro (gtkdoc_build module)

    macro (gtkdoc module)
        file (MAKE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${module}/html")
        gtkdoc_build (${module})

        set (DOC_DIR "html/midori-${MIDORI_MAJOR_VERSION}-${MIDORI_MINOR_VERSION}")
        install (DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${module}/html/"
            DESTINATION "${CMAKE_INSTALL_DATADIR}/gtk-doc/${DOC_DIR}/${module}"
            PATTERN "html/*"
            PATTERN "index.sgml" EXCLUDE)
    endmacro (gtkdoc module)
endif ()<commit_msg>Build docs in build folder<commit_after># GtkDoc.cmake
#
# Macros for building Midori API documentation.
# Copyright (C) 2013 <NAME>

find_program (GTKDOC_SCAN_BIN gtkdoc-scan)
find_program (GTKDOC_MKDB_BIN gtkdoc-mkdb)
find_program (GTKDOC_MKHTML_BIN gtkdoc-mkhtml)
find_program (GTKDOC_MKTMPL_BIN gtkdoc-mktmpl)

if (GTKDOC_SCAN_BIN AND GTKDOC_MKTMPL_BIN AND GTKDOC_MKDB_BIN
        AND GTKDOC_MKHTML_BIN)

    set (GTKDOC_FOUND TRUE)

    macro (gtkdoc_build module)
        # file (MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${module}")
        add_custom_target ("gtkdoc-scan_${module}" ALL
            ${GTKDOC_SCAN_BIN} --module=${module}
                --source-dir="${CMAKE_SOURCE_DIR}/${module}"
                --output-dir="${CMAKE_CURRENT_BINARY_DIR}"
                --rebuild-sections --rebuild-types
                WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")

        add_custom_target ("gtkdoc-tmpl_${module}" ALL
            ${GTKDOC_MKTMPL_BIN} --module=${module}
            --output-dir="${CMAKE_CURRENT_BINARY_DIR}"
            WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")

        add_custom_target ("gtkdoc-docbook_${module}" ALL
            ${GTKDOC_MKDB_BIN} --module=${module}
                --output-dir="xml"
                --source-suffixes=c,h --output-format=xml
                --default-includes=${module}/${module}.h
                --sgml-mode --main-sgml-file=${module}.sgml
            WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")

        add_dependencies ("gtkdoc-docbook_${module}"
            "gtkdoc-tmpl_${module}"
            "gtkdoc-scan_${module}")

        # Keep this target alone, otherwise build fails
        add_custom_target ("gtkdoc-html_${module}" ALL
            ${GTKDOC_MKHTML_BIN} ${module}
            "${CMAKE_CURRENT_BINARY_DIR}/${module}.sgml"
            WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${module}/html")

        add_dependencies ("gtkdoc-html_${module}"
            "gtkdoc-docbook_${module}")
    endmacro (gtkdoc_build module)

    macro (gtkdoc module)
        file (MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${module}/html")
        gtkdoc_build (${module})

        set (DOC_DIR "html/midori-${MIDORI_MAJOR_VERSION}-${MIDORI_MINOR_VERSION}")
        install (DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${module}/html/"
            DESTINATION "${CMAKE_INSTALL_DATADIR}/gtk-doc/${DOC_DIR}/${module}"
            PATTERN "html/*"
            PATTERN "index.sgml" EXCLUDE)
    endmacro (gtkdoc module)
endif ()
{'fraction_non_alphanumeric': 0.13356585966352072, 'fraction_numerical': 0.0016413623307345096, 'mean_word_length': 2.7384969325153374, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '2595760', 'n_tokens_mistral': 1730, 'n_tokens_neox': 1580, 'n_words': 247}