From: Chris Luke Date: Thu, 1 Sep 2016 13:04:01 +0000 (-0400) Subject: VPP-221 Improve doxygen dependency check X-Git-Tag: v17.01-rc0~255 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F85%2F2585%2F2;p=vpp.git VPP-221 Improve doxygen dependency check Only try to install packages if they're not installed. Saves a trip through sudo which is useful when you have a non-privileged account generating the docs. Change-Id: I3709aceb15516a45ea2f9510d91c6d2e42c8c349 Signed-off-by: Chris Luke --- diff --git a/doxygen/Makefile b/doxygen/Makefile index df7d07d72ea..f3ddb2c991c 100644 --- a/doxygen/Makefile +++ b/doxygen/Makefile @@ -63,7 +63,11 @@ SIPHON_DOCS = $(addprefix $(SIPHON_OUTPUT)/,$(addsuffix .md,$(SIPHONS))) $(BR)/.doxygen-bootstrap.ok: ifeq ($(OS_ID),ubuntu) - @sudo -E apt-get $(CONFIRM) $(FORCE) install $(DOC_DEB_DEPENDS) + @set -e; inst=; \ + for i in $(DOC_DEB_DEPENDS); do \ + dpkg-query --show $$i >/dev/null 2>&1 || inst="$$inst $$i"; \ + done; \ + [ "$$inst" ] && sudo apt-get $(CONFIRM) $(FORCE) install $$inst else ifneq ("$(wildcard /etc/redhat-release)","") @sudo yum install $(CONFIRM) $(DOC_RPM_DEPENDS) else