Commit cc040c6b authored by Sebastian Ramacher's avatar Sebastian Ramacher

Build doxygen documentation using meson

parent 2afbdc07
......@@ -2,7 +2,7 @@
# General information
PROJECT_NAME = girara
OUTPUT_DIRECTORY = build
OUTPUT_DIRECTORY = @DOXYGEN_OUTPUT@
OUTPUT_LANGUAGE = English
TAB_SIZE = 2
EXTRACT_ALL = YES
......@@ -16,7 +16,7 @@ WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
# Input files
INPUT = ../
INPUT = @DOXYGEN_INPUT@
EXCLUDE = ../tests
FILE_PATTERNS = *.h
RECURSIVE = YES
......
# See LICENSE file for license and copyright information
include ../config.mk
include ../common.mk
include ../colors.mk
include config.mk
DOXYGEN_SOURCES=$(wildcard ../*.h) Doxyfile
all: html
html: ${DOXYGEN_BUILDDIR}/html/index.html
clean:
$(call colorecho,RM,doc/${DOXYGEN_BUILDDIR})
$(QUIET)rm -rf ${DOXYGEN_BUILDDIR}
${DOXYGEN_BUILDDIR}/html/index.html:
$(call colorecho,DOC,"Build HTML documentation")
$(QUIET)${DOXYGEN_BIN} Doxyfile
.PHONY: clean html all
# See LICENSE file for license and copyright information
DOXYGEN_BIN ?= doxygen
DOXYGEN_BUILDDIR ?= build
doxygen = find_program('doxygen', required: false)
if get_option('enable-docs') and doxygen.found()
conf_data = configuration_data()
conf_data.set('DOXYGEN_INPUT', meson.source_root())
conf_data.set('DOXYGEN_OUTPUT', meson.current_build_dir())
doxyfile = configure_file(
input: 'Doxyfile.in',
output: 'Doxyfile',
configuration: conf_data
)
custom_target('doc',
build_by_default: true,
command: [doxygen, doxyfile],
output: ['html']
)
endif
......@@ -153,4 +153,5 @@ pkg.generate(
requires_private: pc_requires_private,
)
subdir('doc')
subdir('tests')
......@@ -8,3 +8,8 @@ option('enable-json',
value: true,
description: 'Enable json-c support if available.'
)
option('enable-docs',
type: 'boolean',
value: true,
description: 'Build Doxygen documentation if available.'
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment