diff options
author | Chris Luke <chrisy@flirble.org> | 2016-09-01 09:04:01 -0400 |
---|---|---|
committer | Dave Wallace <dwallacelf@gmail.com> | 2016-09-02 05:33:01 +0000 |
commit | ee4743adf5019ccc800257991492aec75d2f3e44 (patch) | |
tree | a5d15446c4e7baa1f8e10647a997456256716d53 | |
parent | 406ab9d3657d028c974069ce63807a88dfa62a4f (diff) |
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 <chrisy@flirble.org>
-rw-r--r-- | doxygen/Makefile | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/doxygen/Makefile b/doxygen/Makefile index df7d07d7..f3ddb2c9 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 |