Commit 8bd390d3 authored by Moritz Lipp's avatar Moritz Lipp

Use sphinx for documentation

parent df25afd5
......@@ -13,9 +13,12 @@ zathura.pc
gcov/
*.swp
version.h
doc/
./doc/_build
*.tmp
zathura.1
zathurarc.5
.version-checks/
dbus-interface-definitions.c
.ycm_extra_conf.py
.ropeproject
compile_commands.json
......@@ -99,7 +99,6 @@ clean:
${PROJECT}-debug \
.depend \
${PROJECT}.pc \
doc \
version.h \
version.h.tmp \
dbus-interface-definitions.c \
......@@ -111,6 +110,7 @@ ifneq "$(wildcard ${RSTTOMAN})" ""
endif
$(QUIET)$(MAKE) -C tests clean
$(QUIET)$(MAKE) -C po clean
$(QUIET)$(MAKE) -C doc clean
${PROJECT}-debug: ${DOBJECTS}
$(ECHO) CC -o $@
......@@ -156,7 +156,7 @@ dist: clean build-manpages
$(QUIET)rm -rf ${PROJECT}-${VERSION}
doc:
$(QUIET)doxygen Doxyfile
$(QUIET)make -C doc
gcov: clean
$(QUIET)CFLAGS="${CFLAGS} -fprofile-arcs -ftest-coverage" LDFLAGS="${LDFLAGS} -fprofile-arcs" ${MAKE} $(PROJECT)
......
......@@ -31,6 +31,9 @@ WITH_MAGIC=0.
If you pass these flags as a command line argument to make, you have to ensure
to pass the same flags when executing the install target.
If you want to build zathuras documentation, please install all python
dependencies from the ./doc/requirements.txt file.
Installation
------------
To build and install zathura:
......
......@@ -2,7 +2,7 @@
# General information
PROJECT_NAME = zathura
OUTPUT_DIRECTORY = ./doc/
OUTPUT_DIRECTORY = ./_build/doxygen/
OUTPUT_LANGUAGE = English
TAB_SIZE = 2
EXTRACT_ALL = YES
......@@ -16,15 +16,15 @@ WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
# Input files
INPUT =
EXCLUDE = ./tests
INPUT = ../
EXCLUDE = ./tests ./doc
FILE_PATTERNS = *.h *.c
RECURSIVE = YES
# Output files
GENERATE_HTML = YES
GENERATE_HTML = NO
GENERATE_LATEX = NO
GENERATE_RTF = NO
GENERATE_XML = NO
GENERATE_XML = YES
SOURCE_BROWSER = YES
# See LICENSE file for license and copyright information
#
include ../config.mk
include ../common.mk
include config.mk
ifeq ($(shell which $(SPHINX_BIN) >/dev/null 2>&1; echo $$?), 1)
$(error The '$(SPHINX_BIN)' command was not found.)
endif
all: init html man
init:
$(QUIET)mkdir -p $(SPHINX_BUILDDIR)/
clean:
$(QUIET)rm -rf $(SPHINX_BUILDDIR)/
html: doxygen
$(QUIET)$(SPHINX_BIN) -b html $(SPHINX_OPTS) $(SPHINX_BUILDDIR)/html
man: doxygen
$(QUIET)$(SPHINX_BIN) -b man $(SPHINX_OPTS) $(SPHINX_BUILDDIR)/man
doxygen:
$(QUIET)$(DOXYGEN_BIN) Doxyfile
.PHONY: clean html man
API and Development
===================
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# See LICENSE file for license and copyright information
import sphinx_rtd_theme
# -- General configuration ------------------------------------------------
extensions = ['sphinx.ext.todo', 'breathe']
source_suffix = '.rst'
master_doc = 'index'
templates_path = ['_templates']
exclude_patterns = ['_build']
pygments_style = 'sphinx'
# -- Project configuration ------------------------------------------------
project = 'zathura'
copyright = '2014, pwmt.org'
version = '0.2.7'
release = '0.2.7'
# -- Options for HTML output ----------------------------------------------
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
html_static_path = ['_static']
htmlhelp_basename = 'zathuradoc'
# -- Options for manual page output ---------------------------------------
man_pages = [
('index', 'zathura', 'zathura Documentation', ['pwmt.org'], 1)
]
# -- Options for breathe ---------------------------------------
breathe_projects = { "zathura": "_build/doxygen/xml" }
breathe_default_project = "zathura"
breathe_build_directory = "_build"
breathe_projects_source = {
"zathura": "../"
}
breathe_domain_by_extension = {
"h" : "c",
"c" : "c"
}
# See LICENSE file for license and copyright information
SPHINX_BIN = sphinx-build
SPHINX_BUILDDIR = _build
SPHINX_OPTS = -d $(SPHINX_BUILDDIR)/doctrees .
DOXYGEN_BIN = doxygen
Configuration
=============
.. zathura documentation master file, created by
sphinx-quickstart on Tue Apr 8 18:33:05 2014.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to zathura's documentation!
===================================
.. toctree::
:maxdepth: 2
:numbered:
installation/index
usage/index
configuration/index
api/index
faq
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
Installation
============
Jinja2==2.7.2
MarkupSafe==0.19
Pygments==1.6
Sphinx==1.2.2
breathe==1.2.0
docutils==0.11
sphinx-rtd-theme==0.1.6
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