forked from withlin/advanced-go-programming-book
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
37 lines (27 loc) · 1005 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Copyright 2017 <chaishushan{AT}gmail.com>. All rights reserved.
# Use of this source code is governed by a Apache
# license that can be found in the LICENSE file.
UML_FILES=$(wildcard ./*.plantuml)
UML_SVG_FILES=$(patsubst %.plantuml,%.uml.svg,$(UML_FILES))
UML_PNG_FILES=$(patsubst %.plantuml,%.uml.png,$(UML_FILES))
DOT_FILES=$(wildcard ./*.dot)
DOT_PNG_FILES=$(patsubst %.dot,%.dot.png,$(DOT_FILES))
DITAA_FILES=$(wildcard ./*.ditaa.txt)
DITAA_PNG_FILES=$(patsubst %.ditaa.txt,%.ditaa.png,$(DITAA_FILES))
default: $(UML_PNG_FILES) $(DOT_PNG_FILES) $(DITAA_PNG_FILES)
@echo "ok"
logo:
convert logo-2018-01.png -resize 300x65 logo.png
@echo "ok"
clean:
-rm *.dot.png
-rm *.uml.png
-rm *.uml.svg
%.uml.svg: %.plantuml
cat $< | docker run --rm -i chai2010/ibox:plantuml > $@
%.uml.png: %.plantuml
cat $< | docker run --rm -i chai2010/ibox:plantuml -tpng > $@
%.dot.png: %.dot
dot -Tpng -o $@ $<
%.ditaa.png: %.ditaa.txt
docker run --rm -it -v `pwd`:/root chai2010/ibox:ditaa $< $@