896c219ce2495de3b76724206da6dce1daff8c22
[epoint] / pkg / Makefile
1 include $(GOROOT)/src/Make.inc
2
3 all: install
4
5 DIRS=\
6         document\
7         key\
8         server\
9         store\
10         ../cmd/genkey\
11         ../cmd/epoint-client\
12         ../cmd/epoint-server\
13
14 fmt.dirs: $(addsuffix .fmt, $(DIRS))
15 clean.dirs: $(addsuffix .clean, $(DIRS))
16 install.dirs: $(addsuffix .install, $(DIRS))
17 nuke.dirs: $(addsuffix .nuke, $(DIRS))
18 test.dirs: $(addsuffix .test, $(DIRS))
19 testshort.dirs: $(addsuffix .testshort, $(DIRS))
20
21 %.fmt:
22         gofmt -w $*/*.go
23
24 %.clean:
25         +$(MAKE) -C $* clean
26
27 %.install:
28         +@echo install $*
29         +@$(MAKE) -C $* install.clean >$*/build.out 2>&1 || (echo INSTALL FAIL $*; cat $*/build.out; exit 1)
30
31 %.nuke:
32         +$(MAKE) -C $* nuke
33
34 %.test:
35         +@echo test $*
36         +@$(MAKE) -C $* test.clean >$*/test.out 2>&1 || (echo TEST FAIL $*; cat $*/test.out; exit 1)
37
38 fmt: fmt.dirs
39
40 clean: clean.dirs
41
42 install: install.dirs
43
44 test: test.dirs
45
46 nuke: nuke.dirs
47         rm -rf "$(GOROOT)"/pkg/$(GOOS)_$(GOARCH)/epoint
48
49 deps:
50         ./deps.sh
51
52 echo-dirs:
53         @echo $(DIRS)
54
55 -include Make.deps