Added support for openSUSE
[vpp.git] / doxygen / Makefile
index ffce3c1..069d97f 100644 (file)
@@ -35,6 +35,7 @@ OS_ID ?= $(shell grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
 # Package dependencies
 DOC_DEB_DEPENDS = doxygen graphviz python-pyparsing python-jinja2
 DOC_RPM_DEPENDS = doxygen graphviz pyparsing python-jinja2
+DOC_SUSE_RPM_DEPENDS = doxygen graphviz python-pyparsing python-Jinja2
 DOC_MAC_BIN_DEPENDS = doxygen dot git
 DOC_MAC_PY_DEPENDS = pyparsing jinja2
 
@@ -52,16 +53,14 @@ DOXY_SRC_DIRECTORIES = \
        $(DOXY_SRC)/vlibsocket \
        $(DOXY_SRC)/vnet \
        $(DOXY_SRC)/vpp \
-       $(DOXY_SRC)/vpp-api \
-       vpp-api
+       $(DOXY_SRC)/vpp-api
 
 # Input directories and files
 DOXY_INPUT ?= \
        $(wildcard $(WS_ROOT)/*.md) \
        $(wildcard $(DOXY_DIR)/*.md) \
        $(DOXY_SRC_DIRECTORIES) \
-       $(DOXY_SRC)/plugins \
-       plugins
+       $(DOXY_SRC)/plugins
 
 # Strip leading workspace path from input names
 DOXY_INPUT := $(subst $(WS_ROOT)/,,$(DOXY_INPUT))
@@ -74,8 +73,8 @@ DOXY_INPUT := $(subst $(WS_ROOT)/,,$(DOXY_INPUT))
 DOXY_EXCLUDE ?= \
        $(DOXY_SRC)/vlib/vlib/buffer.c \
        $(DOXY_SRC)/vlib/example \
-       plugins/sample-plugin \
-       vpp-api/lua
+       $(DOXY_SRC)/vpp-api/lua \
+       plugins/sample-plugin
 
 # Generate a regexp for filenames to exclude
 DOXY_EXCLUDE_REGEXP = ($(subst .,\.,$(shell echo '$(strip $(DOXY_EXCLUDE))' | sed -e 's/ /|/g')))
@@ -161,8 +160,10 @@ else ifeq ($(OS_ID),darwin)
                        false; \
                ); \
        done
+else ifeq ($(OS_ID),opensuse)
+       @sudo zypper install $(CONFIRM) $(DOC_SUSE_RPM_DEPENDS)
 else
-       $(error "Building documentation currently works only on Ubuntu, CentOS or MacOS systems.")
+       $(error "Building documentation currently works only on Ubuntu, CentOS, MacOS and OpenSUSE systems.")
 endif
        @touch $@