Browse files

Add Makefile for plantuml

  • Loading branch information...
pelle committed Nov 25, 2017
1 parent 5f9e8ac commit b5240b55db74639a16217252ed6dc0e9bc20232a
Showing with 27 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +26 −0 Makefile
@@ -1 +1,2 @@
@@ -0,0 +1,26 @@
DIAGRAMS_SRC := $(wildcard flows/*.plantuml)
DIAGRAMS_PNG := $(addsuffix .png, $(basename $(DIAGRAMS_SRC)))
DIAGRAMS_SVG := $(addsuffix .svg, $(basename $(DIAGRAMS_SRC)))
# Default target first; build PNGs, probably what we want most of the time
png: plantuml.jar $(DIAGRAMS_PNG)
# SVG are nice-to-have but don't need to build by default
svg: plantuml.jar $(DIAGRAMS_SVG)
# clean up compiled files
rm -f plantuml.jar $(DIAGRAMS_PNG) $(DIAGRAMS_SVG)
# If the JAR file isn't already present, download it
curl -sSfL $(PLANTUML_JAR_URL) -o plantuml.jar
# Each PNG output depends on its corresponding .plantuml file
flows/%.png: flows/%.plantuml
java -jar plantuml.jar -tpng $^
# Each SVG output depends on its corresponding .plantuml file
flows/%.svg: flows/%.plantuml
java -jar plantuml.jar -tsvg $^

0 comments on commit b5240b5

Please sign in to comment.