]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
build docs: detect sphinx and python-breathe presence in make info
authorPetr Špaček <petr.spacek@nic.cz>
Fri, 13 Jan 2017 08:35:27 +0000 (09:35 +0100)
committerPetr Špaček <petr.spacek@nic.cz>
Fri, 13 Jan 2017 08:35:27 +0000 (09:35 +0100)
Makefile
doc/build.rst
platform.mk

index 42aa454350185d3699894905743fae63ddb54eca..193f2f60fe81ba31b0eabd44e283e5ca91ec2c4b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -25,6 +25,7 @@ $(eval $(call find_alt,lua,luajit))
 $(eval $(call find_lib,cmocka))
 $(eval $(call find_bin,doxygen))
 $(eval $(call find_bin,sphinx-build))
+$(eval $(call find_pythonpkg,breathe))
 $(eval $(call find_lib,libmemcached,1.0))
 $(eval $(call find_lib,hiredis,,yes))
 $(eval $(call find_lib,socket_wrapper))
@@ -96,6 +97,8 @@ info:
        $(info Optional)
        $(info --------)
        $(info [$(HAS_doxygen)] doxygen (doc))
+       $(info [$(HAS_sphinx-build)] sphinx-build (doc))
+       $(info [$(HAS_breathe)] python-breathe (doc))
        $(info [$(HAS_go)] go (modules/go, Go buildmode=c-shared support))
        $(info [$(HAS_libmemcached)] libmemcached (modules/memcached))
        $(info [$(HAS_hiredis)] hiredis (modules/redis))
index e6f0c7d987cd4b29798b7813c7eb39970fedcf6e..f4c67245b120c22468439cd622ba34a575cf6892 100644 (file)
@@ -83,7 +83,9 @@ Most of the dependencies can be resolved from packages, here's an overview for s
    # integration tests
    sudo dnf install cmake git python-dns python-jinja2
    # optional features
-   sudo dnf install doxygen golang hiredis-devel libmemcached-devel systemd-devel
+   sudo dnf install golang hiredis-devel libmemcached-devel systemd-devel
+   # docs
+   sudo dnf install doxygen python-breathe python-sphinx
 
 * **RHEL/CentOS** - unknown.
 * **openSUSE** - there is an `experimental package <https://build.opensuse.org/package/show/server:dns/knot-resolver>`_.
index 67d035a678461c5972e20bb0f796795a9a33d209..6bbbb0a20dc5edb8a77ae7b438df42fe670ae4f3 100644 (file)
@@ -183,6 +183,11 @@ define find_gopkg
        HAS_$(1) := $(shell go list $(2) > /dev/null 2>&1 && echo yes || echo no)
 endef
 
+# Find Python package
+define find_pythonpkg
+       HAS_$(1) := $(shell python -c "import $(1)" > /dev/null 2>&1 && echo yes || echo no)
+endef
+
 define find_soname
 
 # N/A on Windows