diff options
author | Kleis Auke Wolthuizen <github@kleisauke.nl> | 2022-03-24 18:40:37 +0100 |
---|---|---|
committer | Marge Bot <marge-bot@gnome.org> | 2022-04-07 15:20:24 +0000 |
commit | 14a7d3853e586694d814de13ad6bd39dc0bb89c4 (patch) | |
tree | c49c4a7cbfb3dcc6541a43c7113c232d65940b7f | |
parent | 39a6d3418c0df8ca5ea4d0df3e1b14b915c75608 (diff) | |
download | librsvg-14a7d3853e586694d814de13ad6bd39dc0bb89c4.tar.gz |
(#859): Make rst2man and gi-docgen optional
Fixes #859.
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/687>
-rw-r--r-- | Makefile.am | 15 | ||||
-rw-r--r-- | configure.ac | 6 |
2 files changed, 18 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am index a2ec6f42..83e73c38 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,8 @@ -SUBDIRS = . gdk-pixbuf-loader tests doc win32 +if HAVE_GI_DOCGEN +RSVG_DOC = doc +endif + +SUBDIRS = . gdk-pixbuf-loader tests $(RSVG_DOC) win32 NULL = @@ -229,11 +233,20 @@ rsvg-convert$(EXEEXT): $(RSVG_CONVERT_BIN) cd $(LIBRSVG_BUILD_DIR) && mv $(RSVG_CONVERT_BIN) rsvg-convert$(EXEEXT) rsvg-convert.1: rsvg-convert.rst +if HAVE_RST2MAN $(RST2MAN) $(top_srcdir)/rsvg-convert.rst rsvg-convert.1 +else + @echo "========================================" + @echo "You need rst2man installed to make dist" + @echo "========================================" + @false +endif +if HAVE_RST2MAN man1_MANS = rsvg-convert.1 CLEANFILES += rsvg-convert.1 +endif dist_doc_DATA = \ COMPILING.md \ diff --git a/configure.ac b/configure.ac index a4e356a9..a88b55d3 100644 --- a/configure.ac +++ b/configure.ac @@ -117,15 +117,17 @@ dnl Man page generator AC_CHECK_PROGS(RST2MAN, [rst2man rst2man.py], [no]) AS_IF(test x$RST2MAN = xno, - AC_MSG_ERROR([rst2man is required. Please install python3-docutils.]) + AC_MSG_WARN([rst2man not found - not building man pages]) ) +AM_CONDITIONAL(HAVE_RST2MAN, [test "x$RST2MAN" != "xno"]) dnl Gi-docgen AC_CHECK_TOOL(GI_DOCGEN, [gi-docgen], [no]) AS_IF(test x$GI_DOCGEN = xno, - AC_MSG_ERROR([gi-docgen is required. Please install it.]) + AC_MSG_WARN([gi-docgen not found - not building docs]) ) +AM_CONDITIONAL(HAVE_GI_DOCGEN, [test "x$GI_DOCGEN" != "xno"]) dnl =========================================================================== |