From c93b709f960e792f888c63122ac18859517f4c06 Mon Sep 17 00:00:00 2001 From: Ben Reedy Date: Tue, 1 Dec 2020 21:06:46 +1000 Subject: [PATCH] Make build idempotent Only rebuild windows_exporter.exe on changes to any Go source files. Signed-off-by: Ben Reedy --- Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 72745113..24ab5aa8 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,8 @@ export GOOS=windows -build: +.PHONY: build +build: windows_exporter.exe +windows_exporter.exe: **/*.go promu build -v test: @@ -10,7 +12,7 @@ lint: golangci-lint -c .golangci.yaml run .PHONY: e2e-test -e2e-test: build +e2e-test: windows_exporter.exe powershell -NonInteractive -ExecutionPolicy Bypass -File .\tools\end-to-end-test.ps1 fmt: