Skip to content

Commit

Permalink
Make go generate run whenever middleware.cfg is changed (#530)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbelamaric authored and miekg committed Feb 16, 2017
1 parent 84fb9b8 commit bd033ef
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ all: coredns
# Phony this to ensure we always build the binary.
# TODO: Add .go file dependencies.
.PHONY: coredns
coredns: deps
coredns: deps core/zmiddleware.go core/dnsserver/zdirectives.go
go build $(BUILD_VERBOSE) -ldflags="-s -w"

.PHONY: docker
Expand Down Expand Up @@ -48,6 +48,9 @@ clean:
go clean
rm -f coredns

core/zmiddleware.go core/dnsserver/zdirectives.go: middleware.cfg
go generate coredns.go

.PHONY: gen
gen:
go generate coredns.go
Expand Down

0 comments on commit bd033ef

Please sign in to comment.