summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2022-02-19 14:06:57 +0100
committerRobin Jarry <robin@jarry.cc>2022-02-19 15:24:55 +0100
commitbb0f1801402e98266d2554a5f002dc8ce0419808 (patch)
treef1100f9abb31293895b58ce7522ebe73e5262073 /Makefile
parent05ad96a30cb8ea17970c84ea7c72f8f3def5afa5 (diff)
downloadaerc-bb0f1801402e98266d2554a5f002dc8ce0419808.zip
config: do not hardcode sharedir
Instead of using a static SHAREDIR at compile time, use a list of standard paths to use at runtime for templates, config files and stylesets. This implies removing all default filters in the default configuration. Replace them with basic commands. New users can configure the filters as they wish. Signed-off-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 4 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index a1973d2..9c8b921 100644
--- a/Makefile
+++ b/Makefile
@@ -10,8 +10,6 @@ SHAREDIR?=$(PREFIX)/share/aerc
MANDIR?=$(PREFIX)/share/man
GO?=go
GOFLAGS?=
-LDFLAGS:=-X main.Prefix=$(PREFIX)
-LDFLAGS+=-X main.ShareDir=$(SHAREDIR)
LDFLAGS+=-X main.Version=$(VERSION)
GOSRC:=$(shell find * -name '*.go')
@@ -30,7 +28,7 @@ DOCS := \
aerc-templates.7 \
aerc-stylesets.7
-all: aerc aerc.conf $(DOCS)
+all: aerc $(DOCS)
aerc: $(GOSRC)
$(GO) build $(GOFLAGS) -ldflags "$(LDFLAGS)" -o $@
@@ -47,9 +45,6 @@ checkfmt:
exit 1; \
fi
-aerc.conf: config/aerc.conf.in
- sed -e 's:@SHAREDIR@:$(SHAREDIR):g' > $@ < config/aerc.conf.in
-
.PHONY: debug
debug: aerc.debug
@echo 'Run `./aerc.debug` and use this command in another terminal to attach a debugger:'
@@ -73,9 +68,9 @@ doc: $(DOCS)
RM?=rm -f
clean:
- $(RM) $(DOCS) aerc.conf aerc
+ $(RM) $(DOCS) aerc
-install: $(DOCS) aerc aerc.conf
+install: $(DOCS) aerc
mkdir -m755 -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man1 $(DESTDIR)$(MANDIR)/man5 $(DESTDIR)$(MANDIR)/man7 \
$(DESTDIR)$(SHAREDIR) $(DESTDIR)$(SHAREDIR)/filters $(DESTDIR)$(SHAREDIR)/templates $(DESTDIR)$(SHAREDIR)/stylesets
install -m755 aerc $(DESTDIR)$(BINDIR)/aerc
@@ -91,7 +86,7 @@ install: $(DOCS) aerc aerc.conf
install -m644 aerc-templates.7 $(DESTDIR)$(MANDIR)/man7/aerc-templates.7
install -m644 aerc-stylesets.7 $(DESTDIR)$(MANDIR)/man7/aerc-stylesets.7
install -m644 config/accounts.conf $(DESTDIR)$(SHAREDIR)/accounts.conf
- install -m644 aerc.conf $(DESTDIR)$(SHAREDIR)/aerc.conf
+ install -m644 config/aerc.conf $(DESTDIR)$(SHAREDIR)/aerc.conf
install -m644 config/binds.conf $(DESTDIR)$(SHAREDIR)/binds.conf
install -m755 filters/hldiff $(DESTDIR)$(SHAREDIR)/filters/hldiff
install -m755 filters/html $(DESTDIR)$(SHAREDIR)/filters/html