From 84e51f7222085b4e8b33cdf719f89f542e46b9e0 Mon Sep 17 00:00:00 2001 From: Simon Pasquier Date: Wed, 13 Mar 2019 09:40:17 +0100 Subject: [PATCH] Update Makefile.common (#548) Signed-off-by: Simon Pasquier --- Makefile | 5 ----- Makefile.common | 10 +++++++++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 3458e7fa4..7c35f8df2 100644 --- a/Makefile +++ b/Makefile @@ -20,11 +20,6 @@ TSDB_BENCHMARK_OUTPUT_DIR ?= "$(TSDB_CLI_DIR)/benchout" include Makefile.common -.PHONY: deps -deps: - @echo ">> getting dependencies" - GO111MODULE=$(GO111MODULE) $(GO) get $(GOOPTS) -t ./... - build: GO111MODULE=$(GO111MODULE) $(GO) build -o $(TSDB_BIN) $(TSDB_CLI_DIR) diff --git a/Makefile.common b/Makefile.common index 7105cff02..108e49409 100644 --- a/Makefile.common +++ b/Makefile.common @@ -116,6 +116,15 @@ common-check_license: exit 1; \ fi +.PHONY: common-deps +common-deps: + @echo ">> getting dependencies" +ifdef GO111MODULE + GO111MODULE=$(GO111MODULE) $(GO) mod download +else + $(GO) get $(GOOPTS) -t ./... +endif + .PHONY: common-test-short common-test-short: @echo ">> running short tests" @@ -221,7 +230,6 @@ precheck:: define PRECHECK_COMMAND_template = precheck:: $(1)_precheck - PRECHECK_COMMAND_$(1) ?= $(1) $$(strip $$(PRECHECK_OPTIONS_$(1))) .PHONY: $(1)_precheck $(1)_precheck: