#PKG = github.com/Kuckkuck/elasticsearch_exporter PREFIX := /usr
all: build/elasticsearch_exporter
GO := GOPATH=$(CURDIR) GOBIN=$(CURDIR)/build go GO_BUILDFLAGS := GO_LDFLAGS := -s -w
build/elasticsearch_exporter: FORCE
GO_ALLPKGS :=
GO_COVERPKGS := $(shell go list | grep -v plugins)
GO_COVERFILES :=
space :=
check: all static-check build/cover.html FORCE
@echo -e “\e[1;32m>> All tests successful.\e[0m”
static-check: FORCE
@if s=”$$(gofmt -s -l *.go pkg 2>/dev/null)” && test -n “$$s”; then printf ’ => %s\n%s\n’ gofmt “$$s”; false; fi
install: FORCE all install -D -m 0755 build/elasticsearch_exporter “$(DESTDIR)$(PREFIX)/bin/limes”
clean: FORCE rm -f – build/elasticsearch_exporter
build/docker.tar: clean mkdir vendor glide install make GO_LDFLAGS=”-s -w -linkmode external -extldflags -static” DESTDIR=’$(CURDIR)/build/install’ install ( cd build/install && tar cf - . ) > build/docker.tar
DOCKER := docker DOCKER_IMAGE := Kuckkuck/elasticsearch_exporter DOCKER_TAG := latest
docker: build/docker.tar
vendor: FORCE @# vendoring by https://github.com/holocm/golangvend golangvend
.PHONY: FORCE