Doxygen: Refactor Doxyfile.in to doxygen/Doxyfile.

Instead of having Doxyfile.in configured by Autoconf, the Doxyfile
can have the tags that need to be configured piped into the doxygen
command through stdin with the overrides after Doxyfile's contents.

Going forward, the documentation should be generated in two different
modes: liblzma or internal.

liblzma is useful for most users. It is the documentation for just
the liblzma API header files. This is the default.

internal is for people who want to understand how xz and liblzma work.
It might be useful for people who want to contribute to the project.
This commit is contained in:
Lasse Collin 2023-03-16 21:23:48 +08:00 committed by Jia Tan
parent 1b7661faa4
commit c97d12f300
4 changed files with 456 additions and 309 deletions

3
.gitignore vendored
View File

@ -38,7 +38,8 @@ build-aux/test-driver
coverage
/doc/html
/doc/internal
/doc/liblzma
/src/liblzma/liblzma.pc
/src/lzmainfo/lzmainfo

View File

@ -55,7 +55,6 @@ EXTRA_DIST = \
cmake \
CMakeLists.txt \
autogen.sh \
Doxyfile.in \
COPYING.GPLv2 \
COPYING.GPLv3 \
COPYING.LGPLv2.1 \

View File

@ -520,45 +520,6 @@ AC_ARG_ENABLE([doc], [AS_HELP_STRING([--disable-doc],
AM_CONDITIONAL([COND_DOC], [test x$enable_doc != xno])
###########
# Doxygen #
###########
# Doxygen can be enabled in two different modes:
# api - Only generate Doxygen html pages for liblzma API headers.
# all - Generate Doxygen html pages for every file.
# api mode is the default because the primary purpose for the doxygen
# documentation is to publicaly describe liblzma's API. The other html
# pages are only useful for those who want to understand or alter the
# internals of xz and liblzma.
AC_ARG_ENABLE([doxygen], [AS_HELP_STRING([--enable-doxygen=SCOPE],
[Doxygen SCOPE can be `all', or `api'.
The default is `api', which will generate doxygen html
for liblzma API. The `all' option will generate doxygen
html for every .c and .h file.])],
[], [enable_doxygen=api])
case $enable_doxygen in
api)
doxygen_project_name="liblzma ($PACKAGE_NAME)"
doxygen_extract_private=NO
doxygen_input_path=src/liblzma/api
;;
all)
doxygen_project_name="$PACKAGE_NAME"
doxygen_extract_private=YES
doxygen_input_path=src
;;
*)
AC_MSG_ERROR([--enable-doxygen only accepts `all' or `api'])
;;
esac
AC_SUBST([doxygen_project_name])
AC_SUBST([doxygen_extract_private])
AC_SUBST([doxygen_input_path])
##############
# Sandboxing #
##############
@ -1171,7 +1132,6 @@ xz=`echo xz | sed "$program_transform_name"`
AC_SUBST([xz])
AC_CONFIG_FILES([
Doxyfile
Makefile
po/Makefile.in
lib/Makefile

File diff suppressed because it is too large Load Diff