aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2023-03-05 23:44:16 +0100
committerRobin Jarry <robin@jarry.cc>2023-03-06 23:54:02 +0100
commit4d3b1cb98bee1bed18fa6f47192186f8f3eb6e0e (patch)
treefd2adc399cd0f9e5e4c53fb70bb27135725e9818 /Makefile
parenta603d3de038ae75abddd33078a1c8c56614eaf0d (diff)
downloadaerc-4d3b1cb98bee1bed18fa6f47192186f8f3eb6e0e.tar.gz
mk: remove smart rebuild when GOFLAGS have changed
This was a nice idea but it is very annoying since the flags change every time the git commit changes even if there are no changes to the source files nor the GOFLAGS... Building with different GOFLAGS now requires cleaning first. Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Moritz Poldrack <moritz@poldrack.dev>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 2 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index 781c63b1..dd80a895 100644
--- a/Makefile
+++ b/Makefile
@@ -42,18 +42,8 @@ DOCS := \
all: aerc wrap colorize $(DOCS)
-build_cmd:=$(GO) build $(BUILD_OPTS) $(GOFLAGS) -ldflags "$(GO_LDFLAGS)" -o aerc
-
-# the following command outputs nothing, we only want to execute it once
-# and force .aerc.d to be regenerated when build_cmd has changed
-_!=grep -sqFx '$(build_cmd)' .aerc.d || rm -f .aerc.d
-
-.aerc.d:
- @echo 'GOFLAGS have changed, recompiling'
- @echo '$(build_cmd)' > $@
-
-aerc: $(GOSRC) .aerc.d
- $(build_cmd)
+aerc: $(GOSRC)
+ $(GO) build $(BUILD_OPTS) $(GOFLAGS) -ldflags "$(GO_LDFLAGS)" -o aerc
CC?=cc
CFLAGS?=-O2 -g