summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMoritz Poldrack <git@moritz.sh>2022-06-22 12:11:58 +0200
committerRobin Jarry <robin@jarry.cc>2022-06-24 21:08:21 +0200
commit4ebeaa5b95c9899f1c9e3ada3a1bcd97c65db8e7 (patch)
treed660f0cd71a76758fd12b7a380e7d95348672df4 /Makefile
parent420f236d31da76df9982331c596b776ab3d0dd76 (diff)
downloadaerc-4ebeaa5b95c9899f1c9e3ada3a1bcd97c65db8e7.zip
mk: strip build dir from stack traces
Add the -trimpath flag to the default build command to remove the user's path from stack traces. Use a separate BUILD_OPTS make var to avoid it being accidentally overridden on the command line. Signed-off-by: Moritz Poldrack <git@moritz.sh> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 91c0e30..a111508 100644
--- a/Makefile
+++ b/Makefile
@@ -10,6 +10,7 @@ SHAREDIR?=$(PREFIX)/share/aerc
MANDIR?=$(PREFIX)/share/man
GO?=go
GOFLAGS?=
+BUILD_OPTS?=-trimpath
# ignore environment variable
GO_LDFLAGS:=
GO_LDFLAGS+=-X main.Version=$(VERSION)
@@ -34,7 +35,7 @@ DOCS := \
all: aerc $(DOCS)
-build_cmd:=$(GO) build $(GOFLAGS) -ldflags "$(GO_LDFLAGS)" -o aerc
+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