code reorganization
[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 clean.dirs: $(addsuffix .clean, $(DIRS))
15 install.dirs: $(addsuffix .install, $(DIRS))
16 nuke.dirs: $(addsuffix .nuke, $(DIRS))
17 test.dirs: $(addsuffix .test, $(DIRS))
18 testshort.dirs: $(addsuffix .testshort, $(DIRS))
19
20 %.clean:
21         +$(MAKE) -C $* clean
22
23 %.install:
24         +@echo install $*
25         +@$(MAKE) -C $* install.clean >$*/build.out 2>&1 || (echo INSTALL FAIL $*; cat $*/build.out; exit 1)
26
27 %.nuke:
28         +$(MAKE) -C $* nuke
29
30 %.test:
31         +@echo test $*
32         +@$(MAKE) -C $* test.clean >$*/test.out 2>&1 || (echo TEST FAIL $*; cat $*/test.out; exit 1)
33
34 clean: clean.dirs
35
36 install: install.dirs
37
38 test: test.dirs
39
40 nuke: nuke.dirs
41         rm -rf "$(GOROOT)"/pkg/$(GOOS)_$(GOARCH)/epoint
42
43 deps:
44         ./deps.sh
45
46 echo-dirs:
47         @echo $(DIRS)
48
49 -include Make.deps