From f42724caf3b374df0fa4eb170b3527cd20814eed Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Wed, 22 May 2019 12:35:44 -0400 Subject: Install default configs to XDG config if not found --- Makefile | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 64ba7d1..5708845 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,15 @@ +PREFIX?=/usr/local +_INSTDIR=$(DESTDIR)$(PREFIX) +BINDIR?=$(_INSTDIR)/bin +SHAREDIR?=$(_INSTDIR)/share/aerc +MANDIR?=$(_INSTDIR)/share/man GOFLAGS?= aerc: - go build $(GOFLAGS) -o aerc + go build $(GOFLAGS) \ + -ldflags "-X main.Prefix=$(PREFIX)" \ + -ldflags "-X main.ShareDir=$(SHAREDIR)" \ + -o aerc %.1: doc/%.1.scd scdoc < $< > $@ @@ -19,17 +27,13 @@ DOCS := \ aerc-smtp.5 \ aerc-tutorial.7 -all: aerc $(DOCS) +doc: $(DOCS) + +all: aerc doc clean: rm -f *.1 *.5 aerc -PREFIX?=/usr/local -_INSTDIR=$(DESTDIR)$(PREFIX) -BINDIR?=$(_INSTDIR)/bin -SHAREDIR?=$(_INSTDIR)/share/aerc -MANDIR?=$(_INSTDIR)/share/man - install: all mkdir -p $(BINDIR) $(MANDIR)/man1 $(MANDIR)/man5 \ $(SHAREDIR) $(SHAREDIR)/filters @@ -47,4 +51,4 @@ install: all .DEFAULT_GOAL := all -.PHONY: aerc clean install +.PHONY: aerc all doc clean install -- cgit 1.4.1-2-gfad0