summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2022-02-23 20:17:19 +0100
committerRobin Jarry <robin@jarry.cc>2022-02-27 21:11:52 +0100
commitdaa26638bc525fc5fd4e0d68e9c33f9d3789f1a3 (patch)
tree19917f142b874f43e2d2c5180632ab9656d94c39 /Makefile
parente7e22aba60cec373f48ebe21aa6d4898f31f8c66 (diff)
downloadaerc-daa26638bc525fc5fd4e0d68e9c33f9d3789f1a3.zip
mk: fix dynamic source dependencies with bsd make
When building with BSD make, running `make` after updating a source file will not cause the binary to be rebuilt. After inspection, it appears that the GOSRC variable only contains "go.mod go.sum". The aerc target does not depend on .go source files. The $(shell) construct is GNU make specific. BSD make has a special assignment operator (!=) which evaluates a shell command. Since GNU make 4.0, the BSD != operator is supported for compatibility. Use a syntax that is available in both make flavours. Link: https://git.savannah.gnu.org/cgit/make.git/commit/?id=b34438bee83ee Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Koni Marti <koni.marti@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index df8a0c0..9b9d24f 100644
--- a/Makefile
+++ b/Makefile
@@ -12,7 +12,7 @@ GO?=go
GOFLAGS?=
LDFLAGS+=-X main.Version=$(VERSION)
-GOSRC:=$(shell find * -name '*.go')
+GOSRC!=find * -name '*.go'
GOSRC+=go.mod go.sum
DOCS := \