LEFT | RIGHT |
1 include $(GOROOT)/src/Make.inc | 1 include $(GOROOT)/src/Make.inc |
2 | 2 |
3 all: package | 3 all: package |
4 | 4 |
5 TARG=launchpad.net/juju/go/juju/jujutest | 5 TARG=launchpad.net/juju/go/juju/jujutest |
6 | 6 |
7 GOFILES=\ | 7 GOFILES=\ |
8 test.go\ | 8 test.go\ |
9 startstop.go\ | 9 startstop.go\ |
10 | 10 |
11 GOFMT=gofmt | 11 GOFMT=gofmt |
12 BADFMT:=$(shell $(GOFMT) -l $(GOFILES) $(CGOFILES) $(wildcard *_test.go)) | 12 BADFMT:=$(shell $(GOFMT) -l $(GOFILES) $(CGOFILES) $(wildcard *_test.go)) |
13 | 13 |
14 gofmt: $(BADFMT) | 14 gofmt: $(BADFMT) |
15 @for F in $(BADFMT); do $(GOFMT) -w $$F && echo $$F; done | 15 @for F in $(BADFMT); do $(GOFMT) -w $$F && echo $$F; done |
16 | 16 |
17 ifneq ($(BADFMT),) | 17 ifneq ($(BADFMT),) |
18 ifneq ($(MAKECMDGOALS),gofmt) | 18 ifneq ($(MAKECMDGOALS),gofmt) |
19 $(warning WARNING: make gofmt: $(BADFMT)) | 19 $(warning WARNING: make gofmt: $(BADFMT)) |
20 endif | 20 endif |
21 endif | 21 endif |
22 | 22 |
23 include $(GOROOT)/src/Make.pkg | 23 include $(GOROOT)/src/Make.pkg |
24 | 24 |
LEFT | RIGHT |