Skip to content

Commit

Permalink
doc: Simplify Doxygen integration (#32)
Browse files Browse the repository at this point in the history
fix #31
  • Loading branch information
kou committed Aug 22, 2022
1 parent c0ed81e commit 731a2b3
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 15 deletions.
2 changes: 2 additions & 0 deletions doc/Doxyfile → doc/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@ GENERATE_HTML = NO
GENERATE_LATEX = NO
GENERATE_LEGEND = NO
GENERATE_XML = YES
OPTIMIZE_OUTPUT_FOR_C = YES
INPUT = @DATAFUSION_H@
PROJECT_NAME = "DataFusion C"
19 changes: 7 additions & 12 deletions doc/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,15 @@
source_reference = args.source_reference

datafusion_gir = next((build_root / 'datafusion-glib').glob('DataFusion-*.gir'))
doxygen_dir = build_root / 'doc' / 'doxygen'
gi_docgen_config = build_root / 'doc' / 'glib' / 'gi-docgen.toml'
html_dir = build_root / 'doc' / 'html'
html_timestamp = build_root / 'doc' / 'html.timestamp'
sphinx_build_dir = build_root / 'doc' / 'build'
build_doc_dir = build_root / 'doc'
gi_docgen_config = build_doc_dir / 'glib' / 'gi-docgen.toml'
html_dir = build_doc_dir / 'html'
sphinx_build_dir = build_doc_dir / 'build'

shutil.rmtree(doxygen_dir, ignore_errors=True)
os.makedirs(doxygen_dir, exist_ok=True)
shutil.copy2(source_root / 'doc' / 'Doxyfile', doxygen_dir)
shutil.copy2(build_root / 'datafusion.h', doxygen_dir)
subprocess.run('doxygen', cwd=doxygen_dir, check=True)
subprocess.run('doxygen', cwd=build_doc_dir, check=True)

sphinx_env = os.environ.copy()
sphinx_env['DOXYGEN_XML_DIR'] = str(doxygen_dir / 'xml')
sphinx_env['DOXYGEN_XML_DIR'] = str(build_doc_dir / 'xml')
sphinx_env['SWITCHER_VERSION'] = source_reference
subprocess.run(['make',
'-f' + str(source_root / 'doc' / 'Makefile'),
Expand All @@ -76,7 +71,7 @@
check=True)

shutil.rmtree(html_dir, ignore_errors=True)
shutil.copytree(sphinx_build_dir / 'html', html_dir, doxygen_dir)
shutil.copytree(sphinx_build_dir / 'html', html_dir)

subprocess.run(['gi-docgen',
'generate',
Expand Down
12 changes: 10 additions & 2 deletions doc/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,14 @@

subdir('glib')

doxyfile_conf = configuration_data()
doxyfile_conf.set('DATAFUSION_H', datafusion_h.full_path())
doxyfile = configure_file(input: 'Doxyfile.in',
output: 'Doxyfile',
configuration: doxyfile_conf)

depend_files = files(
'..' / 'cbindgen.toml',
'Doxyfile',
'source' / 'conf.py',
'source' / 'example' / 'sql.rst',
'source' / 'glib-api.rst',
Expand All @@ -27,7 +32,10 @@ depend_files = files(
'source' / 'news.rst',
'source' / 'raw-c-api.rst',
)
depend_files += [gi_docgen_toml]
depend_files += [
doxyfile,
gi_docgen_toml,
]

custom_target('html',
command: [
Expand Down
2 changes: 1 addition & 1 deletion doc/source/developer/release.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ APT/Yum repositories at https://apache.jfrog.io/artifactory/arrow/ are
for Apache Arrow. We just reuse these APT/Yum repositories. So we must
follow policy of https://apache.jfrog.io/artifactory/arrow/ .

.. see-also::
.. seealso::

`Release Management Guide for Apache Arrow <apache-arrow-release_>`__.

Expand Down

0 comments on commit 731a2b3

Please sign in to comment.