#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
export DH_GOPKG := github.com/danos/mgmterror

GOBUILDDIR := _build

%:
	dh $@ --buildsystem=golang --with=golang --builddirectory=$(GOBUILDDIR)

override_dh_auto_build: vet
	dh_auto_build

# We do not vet vendor code
vet:
	if go doc cmd/vet >/dev/null 2>&1; then \
		GOPATH=$(CURDIR)/$(GOBUILDDIR) go vet $$(find . -type f -name \*.go | \
		xargs dirname | sort -u | grep -v "/vendor/"); \
	fi

