[pacman-dev] doc: make doxygen build from any directory

Message ID 20201229023635.2677612-1-eschwartz@archlinux.org
State Accepted, archived
Headers show
Series [pacman-dev] doc: make doxygen build from any directory | expand

Commit Message

Eli Schwartz Dec. 29, 2020, 2:36 a.m. UTC
In the autotools build, it only built in-tree, from cwd = doc/ and
resolving doc/../lib/libalpm

In the meson build, this accidentally worked if cwd =
pacman/builddir/ and resolved to builddir/../lib/libalpm/

But... this should always have been configured with the actual path to
the inputs. So, we will now proceed to do so.

Fixes building man3 if your out of tree builddir doesn't happen to be a
direct subdirectory of the source root.

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
---
 doc/Doxyfile.in | 4 ++--
 doc/meson.build | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

Patch

diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in
index 776318da7..6744e7659 100644
--- a/doc/Doxyfile.in
+++ b/doc/Doxyfile.in
@@ -117,8 +117,8 @@  WARN_LOGFILE           =
 #---------------------------------------------------------------------------
 # Configuration options related to the input files
 #---------------------------------------------------------------------------
-INPUT                  = ../lib/libalpm/alpm.h \
-                         ../lib/libalpm/alpm_list.h
+INPUT                  = @INPUT_DIRECTORY@/../lib/libalpm/alpm.h \
+                         @INPUT_DIRECTORY@/../lib/libalpm/alpm_list.h
 INPUT_ENCODING         = UTF-8
 FILE_PATTERNS          =
 RECURSIVE              = NO
diff --git a/doc/meson.build b/doc/meson.build
index 570dc7654..4aaac5540 100644
--- a/doc/meson.build
+++ b/doc/meson.build
@@ -135,6 +135,7 @@  meson.add_install_script(MESON_MAKE_SYMLINK,
 doxygen = find_program('doxygen', required : get_option('doxygen'))
 if doxygen.found() and not get_option('doxygen').disabled()
   doxyconf = configuration_data()
+  doxyconf.set('INPUT_DIRECTORY', meson.current_source_dir())
   doxyconf.set('OUTPUT_DIRECTORY', meson.current_build_dir())
   doxyfile = configure_file(
     input : 'Doxyfile.in',