From 1f68d229aaa163d9cb42c7784d20a44463066af9 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 20 Jan 2023 15:53:52 -0500 Subject: Replace duplicated dox_to_sphinx script with sphinxygen dependency --- doc/c/Doxyfile.in | 2 +- doc/c/api/meson.build | 2 +- doc/cpp/Doxyfile.in | 16 +++++++++++++--- doc/cpp/api/meson.build | 2 +- doc/meson.build | 11 ++++++++--- 5 files changed, 24 insertions(+), 9 deletions(-) (limited to 'doc') diff --git a/doc/c/Doxyfile.in b/doc/c/Doxyfile.in index 6676873..d9ce0c6 100644 --- a/doc/c/Doxyfile.in +++ b/doc/c/Doxyfile.in @@ -30,7 +30,7 @@ PREDEFINED = PUGL_API \ PUGL_MALLOC_API= \ PUGL_MALLOC_FUNC= -RECURSIVE = YES +RECURSIVE = NO STRIP_FROM_PATH = @PUGL_SRCDIR@ INPUT = @PUGL_SRCDIR@/include/pugl/attributes.h \ @PUGL_SRCDIR@/include/pugl/pugl.h \ diff --git a/doc/c/api/meson.build b/doc/c/api/meson.build index 06e522e..6b21aae 100644 --- a/doc/c/api/meson.build +++ b/doc/c/api/meson.build @@ -3,7 +3,7 @@ c_pugl_rst = custom_target( 'C API ReST Documentation', - command: [dox_to_sphinx, '-f', '@INPUT0@', 'doc/c/api'], + command: [sphinxygen, '-f', '@INPUT0@', 'doc/c/api'], input: [c_index_xml] + c_rst_files, output: 'pugl.rst', ) diff --git a/doc/cpp/Doxyfile.in b/doc/cpp/Doxyfile.in index 78ee4c4..ffb2384 100644 --- a/doc/cpp/Doxyfile.in +++ b/doc/cpp/Doxyfile.in @@ -11,6 +11,7 @@ WARN_NO_PARAMDOC = NO JAVADOC_AUTOBRIEF = YES +FULL_PATH_NAMES = NO CASE_SENSE_NAMES = YES EXCLUDE_SYMBOLS = pugl::detail EXTRACT_LOCAL_CLASSES = NO @@ -34,9 +35,18 @@ PREDEFINED = PUGL_API \ PUGL_MALLOC_API= \ PUGL_MALLOC_FUNC= -RECURSIVE = YES +RECURSIVE = NO STRIP_FROM_PATH = @PUGL_SRCDIR@ -INPUT = @PUGL_SRCDIR@/include \ - @PUGL_SRCDIR@/bindings/cpp/include +INPUT = @PUGL_SRCDIR@/include/pugl/attributes.h \ + @PUGL_SRCDIR@/include/pugl/pugl.h \ + @PUGL_SRCDIR@/include/pugl/cairo.h \ + @PUGL_SRCDIR@/include/pugl/gl.h \ + @PUGL_SRCDIR@/include/pugl/stub.h \ + @PUGL_SRCDIR@/include/pugl/vulkan.h \ + @PUGL_SRCDIR@/bindings/cpp/include/pugl/pugl.hpp \ + @PUGL_SRCDIR@/bindings/cpp/include/pugl/cairo.hpp \ + @PUGL_SRCDIR@/bindings/cpp/include/pugl/gl.hpp \ + @PUGL_SRCDIR@/bindings/cpp/include/pugl/stub.hpp \ + @PUGL_SRCDIR@/bindings/cpp/include/pugl/vulkan.hpp OUTPUT_DIRECTORY = @DOX_OUTPUT@ diff --git a/doc/cpp/api/meson.build b/doc/cpp/api/meson.build index 5a77c29..9b2f7e6 100644 --- a/doc/cpp/api/meson.build +++ b/doc/cpp/api/meson.build @@ -3,7 +3,7 @@ cpp_pugl_rst = custom_target( 'C++ API ReST Documentation', - command: [dox_to_sphinx, '-l', 'cpp', '-f', '@INPUT@', '@OUTDIR@'], + command: [sphinxygen, '-l', 'cpp', '-f', '@INPUT@', '@OUTDIR@'], input: cpp_index_xml, output: 'pugl.rst', ) diff --git a/doc/meson.build b/doc/meson.build index 66456b7..e7a1763 100644 --- a/doc/meson.build +++ b/doc/meson.build @@ -4,16 +4,21 @@ docdir = get_option('datadir') / 'doc' doxygen = find_program('doxygen', required: get_option('docs')) -dox_to_sphinx = find_program('../scripts/dox_to_sphinx.py') +sphinxygen = find_program('sphinxygen', required: false) sphinx_build = find_program('sphinx-build', required: get_option('docs')) -build_docs = doxygen.found() and sphinx_build.found() +if not sphinxygen.found() + subproject('sphinxygen') + sphinxygen = find_program('sphinxygen', required: get_option('docs')) +endif + +build_docs = doxygen.found() and sphinxygen.found() and sphinx_build.found() if build_docs subdir('_static') subdir('c') - if not get_option('docs_cpp').disabled() + if get_option('docs_cpp') subdir('cpp') endif endif -- cgit v1.2.1