Skip to content

Commit

Permalink
build: Substitute doc configs
Browse files Browse the repository at this point in the history
Since Meson uses out-of-tree builds, we need to make the paths
in the config replaceable before we can switch to Meson.
  • Loading branch information
jtojnar committed Feb 4, 2024
1 parent 6b05c9a commit 5fd3f3c
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 7 deletions.
7 changes: 7 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -296,12 +296,19 @@ fi
AM_CONDITIONAL(ENABLE_GEGL, test "x$enable_gegl" = "xyes")
AC_SUBST(DOXYGEN_EXCLUDED)

DOXYXML_BUILD_PATH="$PWD/doc"
AC_SUBST(DOXYXML_BUILD_PATH)

DOXYGEN_SOURCE_ROOT="$PWD"
AC_SUBST(DOXYGEN_SOURCE_ROOT)

# Set pkg-config variables before generation.
AC_SUBST(PKG_CONFIG_REQUIRES)

AC_CONFIG_FILES([
doc/Doxyfile
doc/Makefile
doc/source/conf.py
gegl/libmypaint-gegl-]libmypaint_api_platform_version()[.pc:gegl/libmypaint-gegl.pc.in
gegl/Makefile
libmypaint-]libmypaint_api_platform_version()[.pc:libmypaint.pc.in
Expand Down
1 change: 1 addition & 0 deletions doc/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
source/conf.py
Doxyfile
doxygen/
build/
6 changes: 3 additions & 3 deletions doc/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "libmypaint"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 0.1
PROJECT_NUMBER = @LIBMYPAINT_VERSION@

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand All @@ -58,7 +58,7 @@ PROJECT_LOGO =
# entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used.

OUTPUT_DIRECTORY =
OUTPUT_DIRECTORY = @DOXYXML_BUILD_PATH@

# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
# directories (in 2 levels) under the output directory of each output format and
Expand Down Expand Up @@ -819,7 +819,7 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.

INPUT = ../..
INPUT = @DOXYGEN_SOURCE_ROOT@

# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
Expand Down
1 change: 0 additions & 1 deletion doc/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
EXTRA_DIST = \
source/conf.py \
source/index.rst

if ENABLE_DOCS
Expand Down
6 changes: 3 additions & 3 deletions doc/source/conf.py → doc/source/conf.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

# Breathe setup, for integrating doxygen content
extensions.append('breathe')
doxyxml_dir = os.path.join(os.path.abspath(os.path.dirname(__file__)), '../doxygen')
doxyxml_dir = '@DOXYXML_BUILD_PATH@'
print(doxyxml_dir)
breathe_projects = {"libmypaint": doxyxml_dir}
breathe_default_project = "libmypaint"
Expand All @@ -63,9 +63,9 @@
# built documents.
#
# The short X.Y version.
version = '0.1'
version = '@LIBMYPAINT_VERSION@'
# The full version, including alpha/beta/rc tags.
release = '0.1'
release = '@LIBMYPAINT_VERSION_FULL@'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down

0 comments on commit 5fd3f3c

Please sign in to comment.