DOC: Add make rule and bash script to run doxygen

The output directory is not defined by the DOXYGEN_OUTPUT_DIRECTORY
environment variable instead of being hardcoded to `html`. Both the
make rule and the bash script set that variable to `html` by default,
but in the case of the bash script we can override it by defining
the variable in the environement before running the script.
This commit is contained in:
Thierry Crozat 2020-10-05 01:48:22 +01:00
parent 63da4eacb4
commit fe32ac1423
4 changed files with 27 additions and 4 deletions

View file

@ -35,7 +35,8 @@ MODULES += \
graphics \
audio \
common \
po
po \
doc
ifdef USE_MT32EMU
MODULES += audio/softsynth/mt32

8
doc/doxygen/run_doxygen.sh Executable file
View file

@ -0,0 +1,8 @@
#!/bin/bash
DOX_DIR="$(cd $(dirname ${BASH_SOURCE[0]}) && pwd)"
if [ -z "$DOXYGEN_OUTPUT_DIRECTORY" ] ; then
export DOXYGEN_OUTPUT_DIRECTORY=${DOX_DIR}/html
fi
echo "Generating reference documentation in ${DOXYGEN_OUTPUT_DIRECTORY}..."
cd ${DOX_DIR}
doxygen scummvm.doxyfile

View file

@ -58,7 +58,7 @@ PROJECT_LOGO = buildfiles/scummvm_logo.png
# entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used.
OUTPUT_DIRECTORY = html/
OUTPUT_DIRECTORY = $(DOXYGEN_OUTPUT_DIRECTORY)
# 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
@ -781,7 +781,7 @@ WARN_FORMAT = "$file:$line: $text"
# messages should be written. If left blank the output is written to standard
# error (stderr).
WARN_LOGFILE = html/doxygen_warnings.txt
WARN_LOGFILE = doxygen_warnings.txt
#---------------------------------------------------------------------------
# Configuration options related to the input files
@ -2481,4 +2481,4 @@ GENERATE_LEGEND = YES
DOT_CLEANUP = YES
@INCLUDE = links.doxyfile
@INCLUDE = links.doxyfile

14
doc/module.mk Normal file
View file

@ -0,0 +1,14 @@
DOXYGEN_OUTPUT_DIRECTORY := html
export DOXYGEN_OUTPUT_DIRECTORY
doxygen:
@echo "Generating reference documentation in $(srcdir)/doc/doxygen/${DOXYGEN_OUTPUT_DIRECTORY}..."
@cd $(srcdir)/doc/doxygen ; doxygen scummvm.doxyfile
clean-doxygen:
rm -rf $(srcdir)/doc/doxygen/html
rm -f $(srcdir)/doc/doxygen/doxygen_warnings.txt
doc: doxygen
clean-doc: clean-doxygen