Download plantuml.jar only if plantuml is not installed

We download plantuml.jar from sourceforge only if plantuml is not installed.
If plantuml is installed it provides file /usr/share/plantuml/plantuml.jar.
We create link on provided plantuml.jar durring building target 'html'.

Change-Id: I87af76b3d747a7a9a7b86afdbc28cd10ccc4fec6
Closes-Bug: #1475714
This commit is contained in:
Alexander Kislitsky 2015-07-20 17:18:47 +03:00
parent 994f36e9c9
commit b40706925b
1 changed files with 10 additions and 2 deletions

View File

@ -6,7 +6,8 @@ SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
PLANTUML = plantuml.jar
PLANTUML = plantuml.jar
PLANTUML_FROM_PKG = /usr/share/plantuml/plantuml.jar
# Internal variables.
@ -45,7 +46,14 @@ clean:
-rm -rf $(BUILDDIR)/*
$(PLANTUML):
wget http://downloads.sourceforge.net/project/plantuml/plantuml.jar -O $(PLANTUML)
@if [ -f $(PLANTUML_FROM_PKG) ]; \
then \
echo "Have installed plantuml. Creating link $(PLANTUML) on $(PLANTUML_FROM_PKG)."; \
ln -sf $(PLANTUML_FROM_PKG) $(PLANTUML); \
else \
echo "Downloading plantuml.jar."; \
wget https://downloads.sourceforge.net/project/plantuml/plantuml.jar -O $(PLANTUML); \
fi
$(ACTION.TOUCH)
html: $(PLANTUML)