key: parse a single key
[epoint] / pkg / Makefile
index 4917a98..896c219 100644 (file)
@@ -11,12 +11,16 @@ DIRS=\
        ../cmd/epoint-client\
        ../cmd/epoint-server\
 
+fmt.dirs: $(addsuffix .fmt, $(DIRS))
 clean.dirs: $(addsuffix .clean, $(DIRS))
 install.dirs: $(addsuffix .install, $(DIRS))
 nuke.dirs: $(addsuffix .nuke, $(DIRS))
 test.dirs: $(addsuffix .test, $(DIRS))
 testshort.dirs: $(addsuffix .testshort, $(DIRS))
 
+%.fmt:
+       gofmt -w $*/*.go
+
 %.clean:
        +$(MAKE) -C $* clean
 
@@ -31,6 +35,8 @@ testshort.dirs: $(addsuffix .testshort, $(DIRS))
        +@echo test $*
        +@$(MAKE) -C $* test.clean >$*/test.out 2>&1 || (echo TEST FAIL $*; cat $*/test.out; exit 1)
 
+fmt: fmt.dirs
+
 clean: clean.dirs
 
 install: install.dirs