diff --git a/CMakeLists.txt b/CMakeLists.txt index c9052660..153d4c6f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 diff --git a/Makefile.am b/Makefile.am index ee7a74d7..7032fbc9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 diff --git a/convert_doc.sed b/convert_doc.sed deleted file mode 100644 index c08613f9..00000000 --- a/convert_doc.sed +++ /dev/null @@ -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/ diff --git a/convert_doc.sh b/convert_doc.sh deleted file mode 100644 index b41ddd83..00000000 --- a/convert_doc.sh +++ /dev/null @@ -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 diff --git a/Doxyfile b/doc/Doxyfile similarity index 100% rename from Doxyfile rename to doc/Doxyfile diff --git a/doc/Makefile.am b/doc/Makefile.am index 3d6a7f53..e0ad0dbe 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -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 $@ diff --git a/doc/meson.build b/doc/meson.build index 361e7225..7597607c 100644 --- a/doc/meson.build +++ b/doc/meson.build @@ -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() + '/', diff --git a/meson.build b/meson.build index 4e1306b8..a8af753d 100644 --- a/meson.build +++ b/meson.build @@ -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,