From aa18985ef4a2b28c2c7975c1017837e4d57ed7a2 Mon Sep 17 00:00:00 2001 From: Cory Francis Myers Date: Wed, 27 Apr 2022 19:07:18 -0700 Subject: [PATCH] docs: add "make docs" target to wrap Doxygen --- .gitignore | 3 +++ Doxyfile | 4 ++-- Makefile | 8 ++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 183cef1e6..7602e4f42 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +# Doxygen output from "make docs" +docs/ + *.sqlite # Byte-compiled / optimized / DLL files diff --git a/Doxyfile b/Doxyfile index 9beca3d98..b8a2ec464 100644 --- a/Doxyfile +++ b/Doxyfile @@ -58,7 +58,7 @@ PROJECT_LOGO = # entered, it will be relative to the location where doxygen was started. If # left blank the current directory will be used. -OUTPUT_DIRECTORY = +OUTPUT_DIRECTORY = docs # If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- # directories (in 2 levels) under the output directory of each output format and @@ -1817,7 +1817,7 @@ EXTRA_SEARCH_MAPPINGS = # If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output. # The default value is: YES. -GENERATE_LATEX = YES +GENERATE_LATEX = NO # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of diff --git a/Makefile b/Makefile index e7a7a9cfa..afa6c09b5 100644 --- a/Makefile +++ b/Makefile @@ -189,6 +189,14 @@ help: ## Print this message and exit. version: @python -c "import securedrop_client; print(securedrop_client.__version__)" + +.PHONY: docs +docs: ## Generate browsable documentation and call/caller graphs (requires Doxygen and Graphviz) + @which doxygen >> /dev/null || { echo "doxygen(1) is not available in your \$$PATH. Is it installed?"; exit 1; } + @which dot >> /dev/null || { echo "Graphviz's dot(1) is not available in your \$$PATH. Is it installed?"; exit 1; } + @doxygen + @echo "Now open \"$(PWD)/docs/html/index.html\" in your browser." + ############## # # Localization