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>
This commit is contained in:
parent
e7e22aba60
commit
daa26638bc
1 changed files with 1 additions and 1 deletions
2
Makefile
2
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 := \
|
||||
|
|
Loading…
Reference in a new issue