| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
SPHINX_OPTS = |
| 15 |
BUILD_DIR = .build |
| 16 |
DOCS_SOURCE_DIR = . |
| 17 |
|
| 18 |
.PHONY: help clean html doxygen doxysphinx sphinx |
| 19 |
|
| 20 |
help: |
| 21 |
@echo "Please use make <target> where <target> is one of" |
| 22 |
@echo " sphinx to run sphinx." |
| 23 |
@echo " doxygen to run doxygen." |
| 24 |
@echo " doxysphinx to run doxysphinx." |
| 25 |
@echo " html to run everything in correct order to generate the documentation." |
| 26 |
@echo " clean to clean up everything" |
| 27 |
|
| 28 |
clean: |
| 29 |
@poetry run doxysphinx --verbosity=DEBUG clean $(DOCS_SOURCE_DIR) $(BUILD_DIR)/html demo/demo.doxyfile |
| 30 |
|
| 31 |
@poetry run python -c 'exec("import shutil\nimport glob\n\nfor result in glob.glob(\"docs/doxygen/demo/*\"): shutil.rmtree(result)")' |
| 32 |
@poetry run python -c 'exec("import shutil\nimport glob\n\nfor result in glob.glob(\"docs/doxygen/graphviz/*\"): shutil.rmtree(result)")' |
| 33 |
@poetry run python -c 'exec("import shutil\nimport glob\n\nfor result in glob.glob(\".build/*\"): shutil.rmtree(result)")' |
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
doxygen_demo: |
| 38 |
@doxygen demo/demo.doxyfile |
| 39 |
|
| 40 |
doxysphinx_demo: |
| 41 |
@poetry run doxysphinx --verbosity=DEBUG build $(DOCS_SOURCE_DIR) $(BUILD_DIR)/html demo/demo.doxyfile |
| 42 |
|
| 43 |
doxysphinx_demo_with_dir: |
| 44 |
@poetry run doxysphinx --verbosity=DEBUG build $(DOCS_SOURCE_DIR) $(BUILD_DIR)/html docs/doxygen/demo/html |
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
doxygen_graphviz: |
| 49 |
@cd demo/graphviz; doxygen Doxyfile.in |
| 50 |
|
| 51 |
doxysphinx_graphviz: |
| 52 |
@mkdir -p docs/doxygen/graphviz |
| 53 |
@cp -R demo/graphviz/doxygen/html docs/doxygen/graphviz |
| 54 |
@poetry run doxysphinx --verbosity=DEBUG build $(DOCS_SOURCE_DIR) $(BUILD_DIR)/html docs/doxygen/graphviz/html |
| 55 |
|
| 56 |
|
| 57 |
sphinx: |
| 58 |
@poetry run sphinx-build -M html "$(DOCS_SOURCE_DIR)" "$(BUILD_DIR)" '--keep-going' '-j' 'auto' $(SPHINX_OPTS) |
| 59 |
|
| 60 |
|
| 61 |
profile: clean doxygen_demo |
| 62 |
@poetry run python -m cProfile -o .doxysphinx.prof doxysphinx/cli.py --verbosity=DEBUG build $(DOCS_SOURCE_DIR) $(BUILD_DIR) demo/demo.doxyfile |
| 63 |
@poetry run snakeviz .doxysphinx.prof |
| 64 |
@rm .doxysphinx.prof |
| 65 |
|
| 66 |
|
| 67 |
doxygen: doxygen_demo |
| 68 |
|
| 69 |
doxysphinx: doxysphinx_demo |
| 70 |
|
| 71 |
html: doxygen doxysphinx sphinx |
| 72 |
@echo "" |
| 73 |
@echo "Build finished. The Documentation is in $(BUILD_DIR)/html." |