Add sphinx for documentation building

This commit is contained in:
2022-03-10 14:46:55 +01:00
parent 5b3321348a
commit 9cceaac1c1
9 changed files with 73 additions and 27 deletions

View File

@@ -2038,7 +2038,7 @@ MAN_LINKS = NO
# captures the structure of the code including all documentation.
# The default value is: NO.
GENERATE_XML = NO
GENERATE_XML = YES
# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of

View File

@@ -1,7 +1,24 @@
DOXYGEN_INDEX = doxygen/html/index.html
all: $(DOXYGEN_INDEX)
all: $(DOXYGEN_INDEX) sphinx
$(DOXYGEN_INDEX):
doxygen Doxyfile
.PHONY: sphinx
SPHINX_BUILD_DIR = sphinx
$(SPHINX_BUILD_DIR)/index.html: index.rst atrip.rst conf.py
sphinx-build . $(SPHINX_BUILD_DIR)
sphinx: $(SPHINX_BUILD_DIR)/index.html
index.rst: ../README.rst
mv $< $@
atrip.rst: ../atrip.rst
mv $< $@
../%.rst:
make -C $(dir $@) $(notdir $@)
clean:
rm -rfv sphinx doxygen/ index.rst atrip.rst

12
docs/conf.py Normal file
View File

@@ -0,0 +1,12 @@
project = 'Atrip'
copyright = '2022, Alejandro Gallo'
author = 'Alejandro Gallo'
extensions = [ 'breathe' ]
templates_path = ['_templates']
exclude_patterns = []
html_theme = 'nature'
html_static_path = ['_static']
breathe_projects = { "atrip": "doxygen/xml/" }
breathe_default_project = "atrip"

View File

@@ -2,8 +2,16 @@
pkgs.mkShell rec {
imports = [ ../shell.nix ];
buildInputs = with pkgs; [
emacs
emacsPackages.ox-rst
emacsPackages.htmlize
python3
python3Packages.breathe
doxygen
sphinx
];
}