From ae1536746b3daa403c3e90ef9c1701da3f459ada Mon Sep 17 00:00:00 2001 From: Jonas Hahnfeld Date: Wed, 9 Oct 2019 11:22:47 +0200 Subject: [PATCH] Add variables for extra flags to Makefile --- Makefile | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 84363cb..a183798 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,17 @@ +EXTRA_DEPFLAGS ?= +EXTRA_GOFLAGS ?= +EXTRA_TESTFLAGS ?= +COVERAGE_FLAGS ?= -cover + all: dep dynconf .PHONY: all dep: - dep ensure + dep ensure $(EXTRA_DEPFLAGS) .PHONY: dep dynconf: - go build + go build $(EXTRA_GOFLAGS) .PHONY: dynconf fmt: @@ -14,11 +19,10 @@ fmt: .PHONY: fmt TEST_DIRS = ./pkg -COVERAGE ?= -cover test: - go test $(COVERAGE) $(TEST_DIRS) + go test $(EXTRA_TESTFLAGS) $(COVERAGE) $(TEST_DIRS) .PHONY: test bench: - go test -bench . $(TEST_DIRS) + go test $(EXTRA_TESTFLAGS) -bench . $(TEST_DIRS) .PHONY: bench