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:
parent
e9366ffbc4
commit
8c032073eb
@ -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
|
||||
|
@ -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
|
||||
|
@ -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/
|
@ -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
|
@ -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 $@
|
||||
|
@ -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() + '/',
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user