-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile.sample
38 lines (25 loc) · 1.31 KB
/
Makefile.sample
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
38
PACKAGES := io image net net/http bufio reflect net/rpc go/ast os mime/multipart regexp/syntax
all: $(addsuffix .png, $(PACKAGES)) godoc2puml.png all.net.png all.net.http.png all.image.png all.go.png
.PRECIOUS: %.puml
godoc2puml.puml: FORCE
./godoc2puml -scope=github.com/t-yuki/godoc2puml github.com/t-yuki/godoc2puml/... > $@
all.net.puml: FORCE
./godoc2puml -field=bufio,io,fmt,sync,time,reflect, -lolipop=bufio,io,fmt,sync,reflect, net net/http net/mail net/rpc net/smtp net/textproto net/url | grep -v -- '-() "io' > $@
all.net.http.puml: FORCE
./godoc2puml net/http net/http/cgi net/http/cookiejar net/http/fcgi net/http/httptest net/http/httputil net/http/pprof > $@
all.image.puml: FORCE
./godoc2puml image image/color image/color/palette image/draw image/png image/gif image/jpeg > $@
all.go.puml: FORCE
./godoc2puml go/ast go/build go/doc go/format go/parser go/printer go/scanner go/token > $@
godoc2puml: FORCE
go build
%.puml: godoc2puml FORCE
./godoc2puml $* > $(subst /,.,$*).puml
%.png: %.puml
java -Xmx1g -jar plantuml.jar -pipe -tpng < $(subst /,.,$*).puml > $(subst /,.,$*).png
testdata: godoc2puml FORCE
./godoc2puml image > testdata/image.puml
./godoc2puml io > testdata/io.puml
./godoc2puml net > testdata/net.puml
./godoc2puml github.com/t-yuki/godoc2puml/... > testdata/godoc2puml.puml
FORCE: