1
0
mirror of https://github.com/GNOME/libxml2.git synced 2025-05-07 20:39:30 +08:00

doc: More Doxygen cleanup

- Move Doxyfile into doc directory
- Add files to EXTRA_DIST
- Remove conversion script
- Add docs to Meson summary
This commit is contained in:
Nick Wellnhofer 2025-05-02 23:04:48 +02:00
parent e9366ffbc4
commit 8c032073eb
8 changed files with 11 additions and 44 deletions

View File

@ -510,7 +510,7 @@ if(LIBXML2_WITH_TESTS)
endif()
if(LIBXML2_WITH_DOCS OR LIBXML2_WITH_PYTHON)
set(DOXYFILE ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile)
set(DOXYFILE ${CMAKE_CURRENT_SOURCE_DIR}/doc/Doxyfile)
add_custom_command(
OUTPUT doc/html doc/xml
COMMAND ${CMAKE_COMMAND} -E env

View File

@ -207,8 +207,7 @@ EXTRA_DIST = Copyright libxml2-config.cmake.in autogen.sh \
timsort.h \
README.zOS README.md \
CMakeLists.txt config.h.cmake.in libxml2-config.cmake.cmake.in \
meson.build meson_options.txt xml2-config-meson \
Doxyfile
meson.build meson_options.txt xml2-config-meson
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libxml-2.0.pc

View File

@ -1,23 +0,0 @@
# Delete function names
/^ \* (xml|xlink|html)[_[:alnum:]]+:/ d
# Escape
/^ \* /s/#/\\#/g
# Convert parameter names
/^ \* / s/@([_[:alnum:]]+)([^:_[:alnum:]]|$)/`\1`\2/g
# Convert parameters and return values
s/^ \* +@([_[:alnum:]]+):[ ]*/ * @param \1 /
s/^ \* +[Rr]eturns?[[:>:]]:?/ * @returns/
# Convert file headers
s/^ \* +Summary: *(.*)/ * @brief \1\n * /
s/^ \* +Description: */ * /
s/^ \* +Copy:/ * @copyright/
s/^ \* +Author:/ * @author/
s/^ \* +DEPRECATED:?/ * @deprecated/
# Convert ignored sections
s/DOC_DISABLE/@cond IGNORE/
s/DOC_ENABLE/@endcond/

View File

@ -1,13 +0,0 @@
#!/bin/sh
set -e
for file in *.c include/libxml/*.h; do
sed -E -i '' -f convert_doc.sed $file
done
for file in include/libxml/*.h; do
if [ $file != 'include/libxml/xmlversion.h' ]; then
sed -E -i '' -e '1 s,/\*,/**\n * @file\n * ,' $file
fi
done

View File

@ -1,13 +1,17 @@
## Process this file with automake to produce Makefile.in
EXTRA_DIST = \
Doxyfile \
libxml2.css \
mainpage.md \
meson.build \
xml2-config.1 \
xmlcatalog.xml \
xmllint.xml \
meson.build
xmllint.xml
all-local: html.stamp
html.stamp: $(top_srcdir)/Doxyfile
html.stamp: Doxyfile
SOURCE_ROOT=$(top_srcdir)/ BUILD_ROOT=$(top_builddir)/ \
$(DOXYGEN) -q $<
@touch $@

View File

@ -9,7 +9,7 @@ doxygen_docs = custom_target(
files('libxml2.css', 'mainpage.md'),
],
output: [ 'html', 'xml' ],
command: [ doxygen, '-q', doxyfile ],
command: [ doxygen, '-q', files('Doxyfile') ],
env: {
'SOURCE_ROOT': meson.project_source_root() + '/',
'BUILD_ROOT': meson.project_build_root() + '/',

View File

@ -552,7 +552,6 @@ endif
subdir('example')
if want_docs or want_python
doxyfile = files('Doxyfile')
subdir('doc')
endif
@ -614,6 +613,7 @@ summary(
'c14n': want_c14n,
'catalog': want_catalog,
'debug': want_debug,
'docs': want_docs,
'history': want_history,
'html': want_html,
'http': want_http,